[]
        
(Showing Draft Content)

CSJ2K.j2k.entropy.decoder.ByteToBitInput

ByteToBitInput Class

This class provides an adapter to perform bit based input on byte based output obejcts that inherit from a 'ByteInputBuffer' class. This class also performs the bit unstuffing procedure specified for the 'selective arithmetic coding bypass' mode of the JPEG 2000 entropy coder.

Inheritance
ByteToBitInput
Namespace: CSJ2K.j2k.entropy.decoder
Assembly: C1.WPF.PdfViewer.4.6.2.dll
Syntax
public class ByteToBitInput

Constructors

Name Description
ByteToBitInput(ByteInputBuffer)

Instantiates a new 'ByteToBitInput' object that uses 'in' as the underlying byte based input.

Methods

Name Description
checkBytePadding()

Checks for past errors in the decoding process by verifying the byte padding with an alternating sequence of 0's and 1's. If an error is detected it means that the raw bit stream has been wrongly decoded or that the raw terminated segment length is too long. If no errors are detected it does not necessarily mean that the raw bit stream has been correctly decoded.

readBit()

Reads from the bit stream one bit. If 'bpos' is -1 then a byte is read and loaded into the bit buffer, from where the bit is read. If necessary the bit unstuffing will be applied.