Semi-Dynamic Huffman Compression for Low-Latency LZ77 Encoding

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

LZ77-based data compression algorithms face inefficiencies due to the need for two passes through the data, which is costly in terms of time and memory for embedded hardware, and using static Huffman codes results in a significant loss of compression ratio compared to dynamic Huffman codes.

Innovation Solution

Implementing a semi-dynamic compression scheme that processes a small preamble twice and the majority of the data only once, using statistics from the preamble to generate a Huffman code for the entire chunk, allowing for a single pass through the majority of the data while maintaining a compression ratio close to that of full dynamic LZ77 algorithms.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of substance

If two passes through the data are used to construct optimal Huffman code, then compression ratio is improved, but processing time and memory usage increase

Engineering Contradiction:
Improvecompression ratioVSAvoidprocessing time
Core Design Contradiction:
Loss of substanceVSLoss of time

Solution Approach 1:

The patent performs Huffman code construction in advance during a first pass through the data, storing the optimal code in a table. This preliminary action allows the second pass to use the pre-computed code without recalculating, thereby maintaining high compression ratio while reducing the computational burden during actual compression operations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent divides the compression process into two distinct phases: a training phase where the Huffman code is constructed from a portion of the data, and a compression phase where the pre-computed code is applied to the remaining data. This segmentation allows the system to achieve near-optimal compression ratios while avoiding the need to process the entire dataset twice for code construction.

Inventive Principle:
Principle #1Segmentation

2Loss of substance

If two passes through the data are used to construct optimal Huffman code, then compression ratio is improved, but on-chip memory requirements increase

Engineering Contradiction:
Improvecompression ratioVSAvoidon-chip memory
Core Design Contradiction:
Loss of substanceVSVolume of stationary object

Solution Approach 1:

The Huffman code construction is performed in advance and the resulting code table is stored in memory. This preliminary computation allows the system to achieve optimal compression ratios without needing to maintain large working sets during compression, as the code is pre-determined and stored for reuse.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a copy of the optimal Huffman code in a lookup table after the first pass. This copied code can then be referenced multiple times during compression without requiring the original data or recalculating the code, thereby reducing memory requirements during the compression phase.

Inventive Principle:
Principle #26Copying

3Productivity

If static Huffman code is used for single pass compression, then processing speed is improved, but compression ratio deteriorates

Engineering Contradiction:
Improvecompression speedVSAvoidcompression ratio
Core Design Contradiction:
ProductivityVSLoss of substance

Solution Approach 1:

The system performs a preliminary analysis pass to determine the optimal Huffman code specific to the data being compressed. This data-adaptive pre-computation allows the system to achieve compression ratios close to fully dynamic methods while maintaining the speed benefits of static codes during the actual compression phase.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces a semi-dynamic approach where the Huffman code is adapted to the specific data characteristics through a training phase, but then remains fixed during compression. This allows the system to capture the benefits of data-specific optimization without the continuous overhead of dynamic code updates, achieving a balance between speed and compression ratio.

Inventive Principle:
Principle #15Dynamics

4Loss of substance

If four static Huffman codes with header extensions are used, then compression ratio is slightly improved, but device complexity and maintenance burden increase

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

Solution Approach 1:

Instead of using predefined static codes with complex header extensions, the system performs a preliminary analysis to automatically determine the optimal Huffman code for the specific data. This eliminates the need for manual code selection and header management, reducing system complexity while achieving data-adaptive compression ratios.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The compression system automatically performs the analysis and code generation without requiring external configuration or selection of predefined codes. The system serves itself by adapting to the data characteristics and generating the appropriate Huffman code, eliminating the maintenance burden of managing multiple static code sets and their extensions.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10367524B2Semi-dynamic, low latency compression
Publication Date: 2019.07.30 INTEL CORP
  • US10367524B2 patent drawing
  • US10367524B2 patent drawing
  • US10367524B2 patent drawing

AI summary

Methods and apparatus are described by which data is compressed using semi-dynamic Huffman code generation. Embodiments generate symbol statistics over a portion of data. The symbol statistics are expanded to include all possible literals that could appear within the data. Any literal or reference added to the statistics may be given a frequency of one. The statistics are used to generate a semi-dynamic Huffman code. The entire data is then compressed using the semi-dynamic Huffman code.