FMLiveSwitchBZip2Decompressor Class Reference

A bzip2 decompressor. More...

Instance Methods

(instancetype) - initWithInput:
 Initializes a new instance of the FMLiveSwitchBZip2Decompressor class. More...
 
(int) - readByte
 Read a single byte from the stream. More...
 
(int) - readWithBuffer:offset:count:
 Read data from the stream. More...
 

Class Methods

(FMLiveSwitchBZip2Decompressor *) + decompressorWithInput:
 Initializes a new instance of the FMLiveSwitchBZip2Decompressor class. More...
 

Detailed Description

A bzip2 decompressor.

Method Documentation

◆ decompressorWithInput:

+ (FMLiveSwitchBZip2Decompressor*) decompressorWithInput: (FMLiveSwitchDataBuffer *)  input

Initializes a new instance of the FMLiveSwitchBZip2Decompressor class.

Parameters
inputThe input.

◆ initWithInput:

- (instancetype) initWithInput: (FMLiveSwitchDataBuffer *)  input

Initializes a new instance of the FMLiveSwitchBZip2Decompressor class.

Parameters
inputThe input.

◆ readByte

- (int) readByte

Read a single byte from the stream.

Returns
the byte read from the stream, or -1 if EOF

◆ readWithBuffer:offset:count:

- (int) readWithBuffer: (NSMutableData *)  buffer
offset: (int)  offset
count: (int)  count 

Read data from the stream.

         To decompress a BZip2 data stream, create a {0},
         providing a stream that reads compressed data.  Then call Read() on
         that {1}, and the data read will be decompressed
         as you read.



         A {2} can be used only for {3}, not for {4}.
Parameters
bufferThe buffer into which the read data should be placed.
offsetthe offset within that data array to put the first byte read.
countthe number of bytes to read.
Returns
the number of bytes actually read