RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::IO::Compression::GZipStream Class Reference

Provides methods and properties used to compress and decompress streams. More...

Inheritance diagram for System::IO::Compression::GZipStream:
System::IO::Compression::CompressionStream System::IO::Stream

Public Member Functions

 GZipStream (Stream *stream, CompressionMode mode, CompressionLevel level=CompressionLevel::BestCompression, int windowBits=-RLIB_MAX_WBITS)
 Initializes a new instance of the GZipStream class by using the specified stream and compression mode, and optionally leaves the stream open More...
 
- Public Member Functions inherited from System::IO::Compression::CompressionStream
bool GetCanRead () const
 Gets a value indicating whether the stream supports reading while decompressing More...
 
 RLIB_PROPERTY_GET (bool CanRead, GetCanRead)
 Gets a value indicating whether the stream supports reading while decompressing More...
 
StreamGetBaseStream ()
 Gets a reference to the underlying stream More...
 
 RLIB_PROPERTY_GET (Stream *BaseStream, GetBaseStream)
 Gets a reference to the underlying stream More...
 
virtual intptr_t Read (LPVOID buffer, intptr_t count) const override
 Reads a number of decompressed bytes into the specified byte array More...
 
virtual intptr_t Write (LPCVOID data, intptr_t count) override
 Writes compressed bytes to the underlying stream from the specified byte array More...
 
virtual void Flush () override
 Flushs any pending output to the underlying stream No action is performed when using decompress mode More...
 
virtual void Close () override
 Closes the current stream and releases any resources associated with the current stream More...
 
virtual bool InheritFromMemoryStream () const overridefinal
 指示当前实例是否继承自 MemoryStream More...
 
virtual bool InheritFromBufferedStream () const overridefinal
 指示当前实例是否继承自 BufferedStream More...
 
- Public Member Functions inherited from System::IO::Stream
 RLIB_PROPERTY_GET_SET (intptr_t Position, GetPos, SetPos)
 When overridden in a derived class, gets or sets the position within the current stream More...
 
 RLIB_PROPERTY_GET_SET (intptr_t Size, GetSize, SetSize)
 When overridden in a derived class, gets or sets the capacity in bytes of the stream More...
 
 RLIB_PROPERTY_GET_SET (intptr_t Length, GetLength, SetLength)
 When overridden in a derived class, gets or sets the length in bytes of the stream More...
 
intptr_t GetMaxReadSize () const
 Gets the maximum bytes of readable data from current position More...
 
 RLIB_PROPERTY_GET (intptr_t MaxReadSize, GetMaxReadSize)
 Gets the maximum bytes of readable data from current position More...
 
intptr_t GetMaxWriteSize () const
 Gets the maximum writeable bytes from current position, based on current capacity More...
 
 RLIB_PROPERTY_GET (intptr_t MaxWriteSize, GetMaxWriteSize)
 Gets the maximum writeable bytes from current position, based on current capacity More...
 
void CopyTo (Stream *destination, intptr_t bufferSize=RLIB_DEFAULT_BUFFER_SIZE) const
 Reads the bytes from the current stream and writes them to another stream, using a specified buffer size More...
 

Public Attributes

 RLIB_DECLARE_DYNCREATE
 

Additional Inherited Members

- Protected Member Functions inherited from System::IO::Compression::CompressionStream
 CompressionStream (Stream *stream, CompressionMode mode)
 
- Protected Attributes inherited from System::IO::Compression::CompressionStream
unsigned char * m_buffer
 
Streamm_underlying_stream
 
CompressionMode m_mode
 
char m_external_struct [14 *sizeof(intptr_t)]
 
bool m_gzip_header_flag
 
 RLIB_DECLARE_DYNCREATE
 

Detailed Description

Provides methods and properties used to compress and decompress streams.

Constructor & Destructor Documentation

GZipStream::GZipStream ( Stream stream,
CompressionMode  mode,
CompressionLevel  level = CompressionLevel::BestCompression,
int  windowBits = -RLIB_MAX_WBITS 
)

Initializes a new instance of the GZipStream class by using the specified stream and compression mode, and optionally leaves the stream open

Parameters
streamThe stream to compress or decompress
modeOne of the enumeration values that indicates whether to compress or decompress the stream

The documentation for this class was generated from the following files: