Compact Binary Encoding with Variable-Length Length Blocks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing data encoding schemes, such as ASN-1 and UTF8, require multiple reads to determine the length of data blocks and have limitations in encoding data of arbitrary sizes, with ASN-1 having a minimum size of three bytes and a maximum size of 2^1008 bytes, and UTF8 encoding only up to 31 bits.

Innovation Solution

A method and apparatus for encoding data of arbitrary size by dividing it into data blocks and generating length blocks with predetermined sizes, allowing the number of length blocks to be determined without examining all of them, and transmitting both blocks, with encoding rules that can encode data in a minimal number of octets, such as rules 1A through 6A, which can encode data in 1 to 2048 octets with minimal reads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If ASN-1 encoding rules are used, then data structure independence and formal description capability are improved, but the number of reads required to determine length increases and minimum encoding size becomes three bytes

Engineering Contradiction:
Improvedata structure independenceVSAvoidnumber of reads to determine length
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The encoding is divided into distinct segments: a length field occupying specific bit positions (e.g., bits 7-5 for short form, or multiple octets for long form) and data fields. This segmentation allows the length to be determined by reading only the necessary number of leading octets rather than requiring multiple reads through the entire structure, thus resolving the contradiction between formal description capability and reading efficiency.

Inventive Principle:
Principle #1Segmentation

2Adaptability or versatility

If ASN-1 encoding rules are used, then data structure independence is improved, but encoding overhead increases with minimum size of three bytes

Engineering Contradiction:
Improvedata structure independenceVSAvoidencoding overhead
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The encoding scheme applies different quality characteristics to different parts of the data structure. The length field uses a compact representation that adapts to the actual data size: short form length encoding for small values (reducing overhead) and long form length encoding for larger values. This local optimization reduces the minimum encoding overhead while maintaining data structure independence.

Inventive Principle:
Principle #3Local quality

3Adaptability or versatility

If UTF8 encoding is used, then multi-byte character set encoding capability is improved, but the maximum encoding size is limited to 31 bits

Engineering Contradiction:
Improvecharacter set encoding capabilityVSAvoidmaximum encoding size
Core Design Contradiction:
Adaptability or versatilityVSLength of moving object

Solution Approach 1:

The encoding structure employs a nested organization where a universal length field can accommodate arbitrarily large values by using multiple octets in a hierarchical manner. The length field itself can encode values beyond 31 bits by utilizing extended octet sequences, allowing the same encoding framework to handle both character data and arbitrarily large binary objects without size limitations.

Inventive Principle:
Principle #7Nested doll (Nesting)

4Productivity

If compact encoding is implemented with minimal reads, then processing efficiency is improved, but the ability to encode arbitrary size data may be limited

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidarbitrary size encoding capability
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The encoding scheme dynamically adapts its structure based on the data size. The length field automatically adjusts its representation: using short form encoding (fewer octets) for small data sizes to maximize processing efficiency, and transitioning to long form encoding (more octets) for larger data sizes to maintain arbitrary size capability. This dynamic adaptation resolves the contradiction between processing efficiency and arbitrary size encoding.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS7895347B2Compact encoding of arbitrary length binary objects
Publication Date: 2011.02.22 RED HAT INC
  • US7895347B2 patent drawing
  • US7895347B2 patent drawing
  • US7895347B2 patent drawing

AI summary

A method and apparatus for encoding data of arbitrary length. Data of arbitrary size is divided into one or more data blocks. One or more length blocks are generated that include length information identifying a quantity of the one or more data blocks into which the data is divided, wherein the length information can be determined by a number of reads of the length blocks and without examining the data blocks. The length blocks and the data blocks are transmitted.