Variable-Length Integer Encoding With Adaptive Gamma1 Tags

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compression techniques, such as Elias gamma code, are inefficient in compressing sequences of integers, often using twice the number of bits necessary, which is suboptimal for large datasets like web pages stored in search engines.

Innovation Solution

A variable-length compression technique, known as Gamma1 code, determines a threshold value K based on the average size of integers and encodes them by generating tags and remaining bits, allowing for more efficient storage by adjusting the length of the tag and padding bits accordingly, enabling better compression ratios.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If Elias gamma code is used to encode integers, then the encoding process is simple and universal, but the compression ratio is poor (uses twice the necessary bits)

Engineering Contradiction:
Improveencoding simplicityVSAvoidcompression ratio
Core Design Contradiction:
Ease of manufactureVSLoss of substance

Solution Approach 1:

The patent changes the parameter of tag length from fixed (in gamma code) to variable based on the integer size. By introducing a threshold value K and making the tag length adapt to the actual integer size, the encoding achieves better compression while maintaining simplicity. The tag length becomes max(1, N-K) bits instead of always N bits, directly resolving the contradiction between simplicity and compression ratio.

Inventive Principle:
Principle #35Parameter changes

2Ease of operation

If fixed-length tags are used in gamma code, then the encoding structure is uniform and easy to decode, but the storage efficiency is low

Engineering Contradiction:
Improvedecoding easeVSAvoidstorage efficiency
Core Design Contradiction:
Ease of operationVSQuantity of substance

Solution Approach 1:

The patent introduces dynamic tag length that adapts to the integer size. The tag length is determined by max(1, N-K) where N is the integer bit length and K is the threshold. This dynamic adjustment allows shorter tags for smaller integers while maintaining a minimum tag length of 1 bit, thereby improving storage efficiency without making decoding overly complex.

Inventive Principle:
Principle #15Dynamics

3Loss of substance

If variable-length tags are introduced to improve compression, then the compression ratio improves, but the decoding complexity increases

Engineering Contradiction:
Improvecompression ratioVSAvoiddecoding complexity
Core Design Contradiction:
Loss of substanceVSDevice complexity

Solution Approach 1:

The patent performs preliminary action by pre-determining the threshold value K based on the distribution of integer sizes in the dataset. This threshold is calculated before encoding begins, allowing the decoder to use this pre-computed value to quickly determine tag lengths without complex analysis during decoding. The preliminary calculation of K simplifies the variable-length decoding process while maintaining high compression ratios.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7609000B1Variable-length compression technique for encoding or decoding a sequence of integers
Publication Date: 2009.10.27 GOOGLE LLC
  • US7609000B1 patent drawing
  • US7609000B1 patent drawing
  • US7609000B1 patent drawing

AI summary

A system that encodes a sequence of integers using a variable-length compression technique is described. During operation, the system scans the sequence of integers and observes the sizes of the integers to determine a threshold value K from the observed sizes. For a given integer which is N bits in length, if N−K is greater than or equal to zero, the system generates a tag for the encoded integer which comprises a sequence of N−K zeros followed by a one, and generates a set of remaining bits for the encoded integer as a sequence of the N bits which make up the integer. Otherwise, if N−K is less than zero, the system generates a tag for the encoded integer as a single one, and generates a set of remaining bits for the encoded integer by padding the N bits which make up the integer with zeros so that the set of remaining bits is K bits in length.