aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/streams/lzma/lzma.h
blob: af5399c73cdb4dff6e26988c0c7fcd814d841912 (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
35
36
37
#pragma once
 
#include <util/stream/input.h> 
#include <util/stream/output.h> 
#include <util/stream/zerocopy.h> 
 
#include <util/generic/ptr.h> 
 
class TLzmaCompress: public IOutputStream {
public: 
    TLzmaCompress(IOutputStream* slave, size_t level = 7);
    ~TLzmaCompress() override;
 
private: 
    void DoWrite(const void* buf, size_t len) override;
    void DoFinish() override;
 
private: 
    class TImpl; 
    THolder<TImpl> Impl_; 
}; 
 
class TLzmaDecompress: public IInputStream {
public: 
    TLzmaDecompress(IInputStream* slave);
    TLzmaDecompress(IZeroCopyInput* input);
    ~TLzmaDecompress() override;
 
private: 
    size_t DoRead(void* buf, size_t len) override;
 
private: 
    class TImpl; 
    class TImplStream; 
    class TImplZeroCopy; 
    THolder<TImpl> Impl_; 
};