Keyoti RapidSpell Desktop .NET API Docs
Read Method (buffer, offset, count)
APIKeyoti.RapidSpell.CompressionGZipStreamRead(array<Byte>[]()[][], Int32, Int32)
Keyoti RapidSpell Desktop .NET
Read and decompress data from the source stream.
Declaration Syntax
C#C#Visual BasicVisual BasicVisual C++Visual C++F#F#
public override int Read(
	byte[] buffer,
	int offset,
	int count
)
public override int Read(
	byte[] buffer,
	int offset,
	int count
)
Public Overrides Function Read ( 
	buffer As Byte(),
	offset As Integer,
	count As Integer
) As Integer
Public Overrides Function Read ( 
	buffer As Byte(),
	offset As Integer,
	count As Integer
) As Integer
public:
virtual int Read(
	array<unsigned char>^ buffer, 
	int offset, 
	int count
) override
public:
virtual int Read(
	array<unsigned char>^ buffer, 
	int offset, 
	int count
) override
abstract Read : 
        buffer : byte[] * 
        offset : int * 
        count : int -> int 
override Read : 
        buffer : byte[] * 
        offset : int * 
        count : int -> int 
abstract Read : 
        buffer : byte[] * 
        offset : int * 
        count : int -> int 
override Read : 
        buffer : byte[] * 
        offset : int * 
        count : int -> int 
Parameters
buffer (array<Byte>[]()[][])
The buffer into which the decompressed data should be placed.
offset (Int32)
the offset within that data array to put the first byte read.
count (Int32)
the number of bytes to read.
Return Value
Int32
the number of bytes actually read
Remarks
With a GZipStream, decompression is done through reading.
Examples
 Copy imageCopy
byte[] working = new byte[WORKING_BUFFER_SIZE];
using (System.IO.Stream input = System.IO.File.OpenRead(_CompressedFile))
{
    using (Stream decompressor= new Keyoti.RapidSpell.Compression.GZipStream(input, CompressionMode.Decompress, true))
    {
        using (var output = System.IO.File.Create(_DecompressedFile))
        {
            int n;
            while ((n= decompressor.Read(working, 0, working.Length)) !=0)
            {
                output.Write(working, 0, n);
            }
        }
    }
}

Assembly: Keyoti.RapidSpell.NET4 (Module: Keyoti.RapidSpell.NET4.dll) Version: 6.2.21.412