PocketLzma  1.0.0
A cross-platform singleheader LZMA compression/decompression library for C++11
MemoryBuffer.hpp
Go to the documentation of this file.
1 //
2 // Created by robin on 28.12.2020.
3 //
4 
5 #ifndef POCKETLZMA_MEMORYBUFFER_HPP
6 #define POCKETLZMA_MEMORYBUFFER_HPP
7 
8 #include <iostream>
9 
10 namespace plz
11 {
12  class MemoryBuffer : public std::basic_streambuf<char> {
13  public:
14  MemoryBuffer(const uint8_t *p, size_t l) {
15  setg((char*)p, (char*)p, (char*)p + l);
16  }
17  };
18 }
19 
20 #endif //POCKETLZMA_MEMORYBUFFER_HPP
plz::MemoryBuffer::MemoryBuffer
MemoryBuffer(const uint8_t *p, size_t l)
Definition: MemoryBuffer.hpp:14
plz::MemoryBuffer
Definition: MemoryBuffer.hpp:12
plz
Definition: File.hpp:11