Stroika Library 3.0d25
 
Loading...
Searching...
No Matches
Compression/Reader.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2026. All rights reserved
3 */
4
6
8
9 /*
10 ********************************************************************************
11 ********************* DataExchange::Compression::Reader ************************
12 ********************************************************************************
13 */
14 inline Reader::Reader (const shared_ptr<IRep>& rep)
15 : fRep_{rep}
16 {
17 }
18 inline Reader::Reader (Reader&& src)
19 : fRep_{move (src.fRep_)}
20 {
21 }
22 inline const Reader::IRep& Reader::_GetRep () const
23 {
24 EnsureNotNull (fRep_.get ());
25 return *fRep_;
26 }
27 inline InputStream::Ptr<byte> Reader::Compress (const InputStream::Ptr<byte>& src) const
28 {
29 return _GetRep ().Compress (src);
30 }
31 inline BLOB Reader::Compress (const BLOB& src) const
32 {
33 return _GetRep ().Compress (src.As<InputStream::Ptr<byte>> ()).ReadAll ();
34 }
35 inline InputStream::Ptr<byte> Reader::Decompress (const InputStream::Ptr<byte>& src) const
36 {
37 return _GetRep ().Decompress (src);
38 }
39 inline BLOB Reader::Decompress (const BLOB& src) const
40 {
41 return _GetRep ().Decompress (src.As<InputStream::Ptr<byte>> ()).ReadAll ();
42 }
43
44}
#define EnsureNotNull(p)
Definition Assertions.h:343