ComponentAce.Compression.Libs.zlib.ZInputStream.Read C# (CSharp) Method

Read() public method

public Read ( ) : int
return int
        public override int Read()
        {
            if (read(buf1, 0, 1) == - 1)
                return (- 1);
            return (buf1[0] & 0xFF);
        }

Usage Example

コード例 #1
0
        public static void uncompressFile(string inFile, string outFile)
        {
            int data = 0;
            int stopByte = -1;
            System.IO.FileStream outFileStream = new System.IO.FileStream(outFile, System.IO.FileMode.Create);
            ZInputStream inZStream = new ZInputStream(System.IO.File.Open(inFile, System.IO.FileMode.Open, System.IO.FileAccess.Read));
            while (stopByte != (data = inZStream.Read()))
            {
                byte _dataByte = (byte)data;
                outFileStream.WriteByte(_dataByte);
            }

            inZStream.Close();
            outFileStream.Close();
        }
All Usage Examples Of ComponentAce.Compression.Libs.zlib.ZInputStream::Read