| CPC H03M 7/405 (2013.01) | 20 Claims |

|
1. A method comprising:
receiving a source file comprising a plurality of characters;
determining a respective first frequency for each character of the plurality of characters of the source file;
determining a first tree corresponding to the source file based on the respective first frequencies;
encoding the source file using the first tree to generate a first encoded file;
in accordance with a determination that the total number of bits in the first encoded file is not a multiple of a first segment length, appending the first encoded file with one or more bits so that a new total number of bits in the first encoded file is a multiple of the first segment length;
in accordance with a determination that the total number of bits in the first encoded file is a multiple of the first segment length, forgoing appending the first encoded file with one or more bits;
dividing the first encoded file into one or more segments, each segment having the first segment length;
assigning a placeholder value to each of the one or more segments;
determining a respective second frequency for each of the placeholder values in the first encoded file;
determining, based on the respective second frequencies, a second tree corresponding to the first encoded file;
encoding the first encoded file using the second tree to generate a second encoded file; and
generating a package comprising: a bi-dimensional image associated with the second encoded file, and a reference to the second tree.
|