Small Integer Encoding Using Range-Based Compact Codes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional dictionary-based data compression algorithms are not optimized for achieving the theoretical minimum bit encoding, especially when there is a bias towards low values in the data distribution, leading to suboptimal compression ratios.
Innovation Solution
The method involves constructing a code table using the largest power of two integer associated with the size of the data set, and employing a combination of uniform and fractional bit coding schemes to generate codes that are no longer than a fixed integral number of bits, with the option to extend this to sequences of non-repeating small integers by representing the smallest value and differences using shrinking tables.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional dictionary-based encoding systems use fixed length codes, then decoding is simple and fast, but compression ratio is suboptimal when there is a bias towards low values
Solution Approach 1:
The patent changes the parameter of code length from fixed to variable based on the value being encoded. Small values (0-31) use 5 bits, values 32-255 use 6 bits, and values 256-65535 use 7 bits. This parameter change allows the encoding scheme to adapt to the distribution of values, achieving better compression ratios when there is a bias towards low values while maintaining a relatively simple encoding structure.
2Productivity
If variable length codes are used to achieve better compression, then compression ratio improves, but decoding complexity increases
Solution Approach 1:
The patent segments the encoding space into distinct ranges (0-31, 32-255, 256-65535), each with its own fixed bit length. This segmentation allows the decoder to efficiently determine which segment a value belongs to and apply the appropriate decoding logic, reducing overall decoding complexity compared to a fully variable-length scheme while still achieving improved compression ratios.
3Productivity
If uniform coding is used for all integer values, then encoding is simple, but bit efficiency is lost when values are uniformly distributed
Solution Approach 1:
The patent dynamically changes the code length parameter based on the value range being encoded. When values are uniformly distributed across a larger range, the scheme uses longer codes (7 bits for values up to 65535) to maintain bit efficiency. When values are concentrated in smaller ranges, shorter codes are used. This adaptive parameter change achieves better overall bit efficiency while keeping the coding scheme relatively simple through clear range-based rules.
Data Source
AI summary
A method and apparatus for encoding a set of integers is described. The largest power of two integer is determined based on a size of the set of integers with an integer encoder. A code table is constructed using the largest power of two integer. A uniform coding is constructed with values from the code table. A string “1” is prepended to each code from the code table. The string “1” is appended to a string “0” from the code table.


