C# 클래스 ME1Explorer.HuffmanCompression

파일 보기 프로젝트 열기: ME3Explorer/ME3Explorer 1 사용 예제들

공개 메소드들

메소드 설명
LoadInputData ( string fileName ) : void

Loads a file into memory and prepares for compressing it to TLK

replaceTlkwithFile ( ME1Package pcc, int Index ) : void

비공개 메소드들

메소드 설명
BitArrayListToByteArray ( List bitsList, int bitsCount ) : byte[]

Converts bits in a BitArray to an array with bytes. Such array is ready to be written to a file.

BuildCodingArray ( ) : void

Using Huffman Tree (created with BuildHuffmanTree method), generates a binary code for every character.

BuildHuffmanTree ( ) : void

Standard implementation of building a Huffman Tree

CompareNodes ( HuffmanNode L1, HuffmanNode L2 ) : int

For sorting Huffman Nodes

ConvertHuffmanTreeToBuffer ( ) : byte[]

Converts a Huffman Tree to it's binary representation used by TLK format of Mass Effect 1.

LoadXmlInputData ( string fileName ) : void

Loads data from XML file into memory

PrepareHuffmanCoding ( ) : void

Creates Huffman Tree based on data from memory. For every character in text data, a corresponding Huffman Code is prepared. Source: http://en.wikipedia.org/wiki/Huffman_coding

TraverseHuffmanTree ( HuffmanNode node, List code ) : void

Recursively traverses Huffman Tree and generates codes

메소드 상세

LoadInputData() 공개 메소드

Loads a file into memory and prepares for compressing it to TLK
public LoadInputData ( string fileName ) : void
fileName string
리턴 void

replaceTlkwithFile() 공개 메소드

public replaceTlkwithFile ( ME1Package pcc, int Index ) : void
pcc ME3Explorer.Packages.ME1Package
Index int
리턴 void