A compression algorithm for different positive integers: paged multi-bit stream

Source: Internet
Author: User

Just remember, wait till the realization is finished, then write.
The test shows that the compression ratio is related to the data characteristics
Some can reach 170, others can only reach 18

In any case, meet the development requirements


Page out
The integers are grouped according to 65536, each group is called a page, and the compression processing is done on this page;
Benefit: The 4-byte integer becomes all 2 bytes short.

Multi-bit streaming
Block each page again by a certain length
Base: The cardinality of this block
Bits: The bit stream of integers within this block, 1 means that the corresponding integer exists, and 0 means that there is no
Each fixed number of bits in the gate:bits is recorded as a unit, the bit of this unit is all 0, then the corresponding single bit in gate is 0, otherwise 1
bits compression: Delete all 0 units;

Merge buffers
Finally, the above three types of data are encoded into their respective memory, and then eventually merged into the corresponding memory of this page, and then re-merge the memory of multiple pages;

A compression algorithm for different positive integers: paged multi-bit stream

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.