C# Class SwfDotNet.IO.Utils.BitParser

A helper class with static methods for bit-parsing swf data
ファイルを表示 Open project: bladecoding/SwfExport

Public Methods

Method Description
BytewiseReverse ( BitArray bitArr ) : void

Reverse bit order in each byte (8 bits) of a BitArray (change endian bit order)

GetBitValues ( byte byteSequence ) : BitArray

Prepare read bytes for bit parsing

Int32ToByteArray ( int int32 ) : byte[]

convert a signed int 32 to a four bytes array

ReadInt32 ( BitArray bitArr ) : int

convert total BitArray

ReadInt32 ( BitArray bitArr, int length ) : int

starts at index 0

ReadInt32 ( BitArray bitArr, int index, int length ) : int

Overloaded static method Converts part of a BitArray to a signed int32

ReadUInt32 ( BitArray bitArr ) : int

convert total BitArray

ReadUInt32 ( BitArray bitArr, int length ) : int

start at index 0

ReadUInt32 ( BitArray bitArr, int index, int length ) : int

convert part of a BitArray to a unsigned integer (uint32)

Private Methods

Method Description
BitParser ( ) : System Static constructor: initialize bitValueList

Method Details

BytewiseReverse() public static method

Reverse bit order in each byte (8 bits) of a BitArray (change endian bit order)
public static BytewiseReverse ( BitArray bitArr ) : void
bitArr System.Collections.BitArray
return void

GetBitValues() public static method

Prepare read bytes for bit parsing
public static GetBitValues ( byte byteSequence ) : BitArray
byteSequence byte /// Byte sequence read from swf by aBinaryReader ///
return System.Collections.BitArray

Int32ToByteArray() public static method

convert a signed int 32 to a four bytes array
public static Int32ToByteArray ( int int32 ) : byte[]
int32 int int32 number to convert
return byte[]

ReadInt32() public static method

convert total BitArray
public static ReadInt32 ( BitArray bitArr ) : int
bitArr System.Collections.BitArray source BitArray
return int

ReadInt32() public static method

starts at index 0
public static ReadInt32 ( BitArray bitArr, int length ) : int
bitArr System.Collections.BitArray source BitArray
length int bit count
return int

ReadInt32() public static method

Overloaded static method Converts part of a BitArray to a signed int32
public static ReadInt32 ( BitArray bitArr, int index, int length ) : int
bitArr System.Collections.BitArray source BitArray
index int start index
length int bit count
return int

ReadUInt32() public static method

convert total BitArray
public static ReadUInt32 ( BitArray bitArr ) : int
bitArr System.Collections.BitArray source BitArray
return int

ReadUInt32() public static method

start at index 0
public static ReadUInt32 ( BitArray bitArr, int length ) : int
bitArr System.Collections.BitArray source BitArray
length int bit count
return int

ReadUInt32() public static method

convert part of a BitArray to a unsigned integer (uint32)
public static ReadUInt32 ( BitArray bitArr, int index, int length ) : int
bitArr System.Collections.BitArray source BitArray
index int start index
length int bit count
return int