Patent attributes
A method for encoding an input file into an output file that is compressed so that the number of bits required to represent the output file is less than the number of bits of the input file. The encoding method includes the parsing of the input file into a series of data items, the data items having an order and collectively corresponding to the input file. The encoding method compares the series of data items against a static dictionary having at least mappings between terminal sequence pointers and representations of data items. Each mapping has an associated length, the associated length for a mapping being the length of the data item pointed to by its terminal sequence pointer wherein the terminal sequence pointers are represented by a number of bits that is independent of the particular data items in the input file, the static dictionary being static such that the static dictionary is usable to provide a mapping between a terminal sequence pointer and its corresponding representation of data item independent of mapping of other data items. The encoding method adds to the output file an output file element that is a terminal sequence pointer for data items that map to entries in the static dictionary, each output file including at least one terminal sequence pointer. The encoding method adds to the output file an output file element that is a symbol sequence having one or more symbols for data items that are to be represented directly in the output file, and creates an element mapping for the output file to indicate, for each output file element, whether the output file element corresponds to a terminal sequence pointer or a symbol sequence.