|
rippled
|
Enumerations | |
| enum | Algorithm : std::uint8_t { Algorithm::None = 0x00, Algorithm::LZ4 = 0x90 } |
| enum | Compressed : std::uint8_t { Compressed::On, Compressed::Off } |
Functions | |
| template<typename InputStream > | |
| std::size_t | decompress (InputStream &in, std::size_t inSize, std::uint8_t *decompressed, std::size_t decompressedSize, Algorithm algorithm=Algorithm::LZ4) |
| Decompress input stream. More... | |
| template<class BufferFactory > | |
| std::size_t | compress (void const *in, std::size_t inSize, BufferFactory &&bf, Algorithm algorithm=Algorithm::LZ4) |
| Compress input data. More... | |
Variables | |
| constexpr std::size_t | headerBytes = 6 |
| constexpr std::size_t | headerBytesCompressed = 10 |
|
strong |
| Enumerator | |
|---|---|
| None | |
| LZ4 | |
Definition at line 36 of file Compression.h.
|
strong |
| Enumerator | |
|---|---|
| On | |
| Off | |
Definition at line 38 of file Compression.h.
| std::size_t ripple::compression::decompress | ( | InputStream & | in, |
| std::size_t | inSize, | ||
| std::uint8_t * | decompressed, | ||
| std::size_t | decompressedSize, | ||
| Algorithm | algorithm = Algorithm::LZ4 |
||
| ) |
Decompress input stream.
| InputStream | ZeroCopyInputStream |
| in | Input source stream |
| inSize | Size of compressed data |
| decompressed | Buffer to hold decompressed message |
| algorithm | Compression algorithm type |
Definition at line 50 of file Compression.h.
| std::size_t ripple::compression::compress | ( | void const * | in, |
| std::size_t | inSize, | ||
| BufferFactory && | bf, | ||
| Algorithm | algorithm = Algorithm::LZ4 |
||
| ) |
Compress input data.
| BufferFactory | Callable object or lambda. Takes the requested buffer size and returns allocated buffer pointer. |
| in | Data to compress |
| inSize | Size of the data |
| bf | Compressed buffer allocator |
| algorithm | Compression algorithm type |
Definition at line 87 of file Compression.h.
|
constexpr |
Definition at line 31 of file Compression.h.
|
constexpr |
Definition at line 32 of file Compression.h.
1.8.17