blob: 523e5ad01bc4ca8a9a56441a6be60cf567445f2e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
#include <util/generic/ptr.h>
#include <util/generic/yexception.h>
#include <util/stream/input.h>
#include <util/stream/output.h>
class TLzopCompress: public IOutputStream {
public:
TLzopCompress(IOutputStream* slave, ui16 maxBlockSize = 1 << 15);
~TLzopCompress() override;
private:
void DoWrite(const void* buf, size_t len) override;
void DoFlush() override;
void DoFinish() override;
private:
class TImpl;
THolder<TImpl> Impl_;
};
class TLzopDecompress: public IInputStream {
public:
TLzopDecompress(IInputStream* slave, ui32 initialBufferSize = 1 << 16);
~TLzopDecompress() override;
private:
size_t DoRead(void* buf, size_t len) override;
private:
class TImpl;
THolder<TImpl> Impl_;
};
|