CN103546161A - Lossless compression method based on binary processing - Google Patents
Lossless compression method based on binary processing Download PDFInfo
- Publication number
- CN103546161A CN103546161A CN201310526065.5A CN201310526065A CN103546161A CN 103546161 A CN103546161 A CN 103546161A CN 201310526065 A CN201310526065 A CN 201310526065A CN 103546161 A CN103546161 A CN 103546161A
- Authority
- CN
- China
- Prior art keywords
- code
- compression
- business
- complementary
- compression method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000007906 compression Methods 0.000 title claims abstract description 45
- 230000006835 compression Effects 0.000 title claims abstract description 44
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000012545 processing Methods 0.000 title claims abstract description 9
- 238000005538 encapsulation Methods 0.000 claims abstract description 22
- 238000000926 separation method Methods 0.000 claims abstract description 15
- 230000000295 complement effect Effects 0.000 claims description 16
- 238000013461 design Methods 0.000 claims description 4
- 238000005498 polishing Methods 0.000 claims description 3
- 238000013144 data compression Methods 0.000 claims 1
- 238000012795 verification Methods 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract description 5
- 238000004364 calculation method Methods 0.000 abstract description 2
- 230000006837 decompression Effects 0.000 abstract description 2
- 238000002474 experimental method Methods 0.000 abstract description 2
- 230000005540 biological transmission Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000009182 swimming Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000036642 wellbeing Effects 0.000 description 1
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The invention discloses a lossless compression method based on binary processing. The method aims to further reduce the length of a compressed file or a code stream, the single compression ratio can reach 50% at most, the compressed file or the code stream can be compressed many times, and the optimal threshold value can be determined even through a dynamic selection mechanism. The method can be applied to various data transmission and storage products. As is shown in multiple experiments, the method can carry out compression and lossless decompression on data in any format. Compared with other existing lossless compression algorithms, the lossless compression method can be used at the same time with other algorithms, is good in compression effect and little in resource consumption, and has the advantages of strong adaptability, stability, safety, intelligence and the like. The compression part of the method includes the following steps of (1) reading 8 binary values of each byte bit by bit and calculating a quotient code, an excess code and a difference code, (2) selecting or designing an encapsulation separation code according to a calculation result in the step (1), and (3) encapsulating results of the step (1) and the step (2) into a whole byte bit by bit. The decoding part of the method includes the step of reading the compressed file or the code stream according to a set rule for decoding.
Description
Technical field
The present invention relates to the field such as transfer of data, data storage of various forms.
Background technology
Compression algorithm has a wide range of applications, and no matter is aerospace information processing, and the mass memory that science is calculated, and the processing of graph image etc., have a wide range of applications.Such as: the 3G of current mobile communication, 4G network, the exactly communication technology of efficiently setting up in order to transmit.If there is a kind of algorithm can realize super compression, current network needn't change and bring qualitative leap, and from using value, the economic well-being of workers and staff of bringing can be in 10,000,000 hundred million.
Popular lossless compression algorithm comprises huffman coding, Hash coding, LZW compression algorithm, arithmetic compression method and distance of swimming algorithm etc. at present, no matter be to compress by probabilistic method, or compress according to packed data feature, all with a byte, compress, its compression efficiency and range of application have all been subject to restriction to a certain degree.Such as the data that some was compressed, just lack the possibility of further compression.In order to address this problem, invented the lossless compression method of processing based on binary digit, the method, by the least unit of Computer Storage " position " is processed, reaches the effect of packed data length, and by dynamically selecting machine-processed selected threshold, realize optimal compression effect, with encapsulation separation code, realize secondary encapsulation, guaranteed the Lossless Compression rate of 10%--50%, the method is applicable to the data of various forms, experiment shows, best to picture compression effect.
Summary of the invention
The invention discloses a kind of lossless compression algorithm of processing based on binary digit, the binary bit value of each byte is read in the method step-by-step, calculate business's code, complementary and poor bit code, and carry out secondary encapsulation by encapsulation separation code, the effect that realization is compressed data, effectively reduce the required bandwidth of bit stream and reduce the required space of storage file, method is calculated simple, resource consumption is little, there is strong adaptability, stability, fail safe and the advantage such as intelligent, and because being processes based on binary digit, do not conflict with other Lossless Compressions in the use, can use simultaneously.In addition, the method can be compressed based on byte after simplifying, and can replace other lossless compression algorithms within the specific limits.
For achieving the above object, the present invention has set following mechanism.
1. 8 binary bit value of each byte are read in step-by-step, and read continuously, until there is different value (being some 0 or 1 rear appearance 1 or 0);
2. adopt the dynamically mechanism of selecting to choose best compression threshold;
3. based on complementation thought, calculate business's code, complementary, and calculate the figure place that business's code and whole byte number differ, i.e. poor bit code;
4. according to result of calculation, select or design encapsulation separation code, original package separation code comprises FFD8, FFD9 etc.;
5. composition yard such as the business's code pair generating early stage, complementary, poor bit code and encapsulation separation code carry out secondary encapsulation, and determine whether and need to carry out second-compressed.
Accompanying drawing explanation
Accompanying drawing 1 is compression process schematic diagram of the present invention, and in this example, flow process is mainly divided composition code computing module, design encapsulation separation code module and the secondary encapsulation module based on complementation.File or code stream that the present invention processes are defaulted as file or the code stream that conventional compression algorithm was compressed, and can be also undressed file or code stream if desired.
The decompression flow process schematic diagram that accompanying drawing 2 is drawn for the present invention, in this example, flow process mainly comprises reading corresponding composition code module and according to the inverse operation of complementation, each several part being formed to code by setting rule carries out decoder module.
Embodiment
Below in conjunction with accompanying drawing 1 and 2 pairs of technical solutions according to the invention of accompanying drawing, be described in further detail.
Accompanying drawing 1 has shown how based on binary digit, to process file or data are compressed, the method specific implementation step is as follows.
1,8 binary bit value of each byte are read in step-by-step, and read continuously, result is to obtain 0,1 character string that length is file or code stream length * 8, calculate in this character string continuous 0 or 1 length and occurrence number, call on this basis and dynamically select mechanism, choose best compression threshold h
0, h
1;
2, based on complementation thought, calculate business's code, complementary.For 0,1 character string generating in step 1,0 or 1 the length of considering to occur continuously in this character string, is less than h to length
00 string and length be less than h
11 string do not deal with, the business's code that writes direct, is greater than h to length
00 string, the length of 0 string is added to h
0, obtain quotient and remainder divided by 2, by length, being quotient 0 writes business's code, and remainder is write to complementary.For length, be greater than h
11 string, similar processing.After calculating finishes, business's code and complementary all can be by 8 bytes store, and with 0 polishing, now calculate business's code needs k 0 polishing to 8 of last less thaies, and k is poor bit code;
3, business's code that analytical procedure 2 produces and the rule of complementary, the specific characters such as FFD8 that selective system is set are as encapsulation separator, if the specific character of default can not meet compartmentation, or with partial character repeats in business's code of producing of step 2, complementary, the specific character by default generates available encapsulation separator;
4, business's code step 2, step 3 being generated, complementary, poor bit code and encapsulation separation code etc. form code, according to the order of encapsulation separation code 1, business's code, encapsulation separation code 2, complementary, poor bit code, encapsulation separation code 3, carry out secondary encapsulation.After encapsulation finishes, calculate the length of file after compression or code stream, and determine whether and need to carry out second-compressed, if needed, return to step 1.
Accompanying drawing 2 has shown that the compressed file or the code stream that how the lossless compression method of processing based on binary digit are generated decompress, and the method specific implementation step is as follows.
1, by setting rule, read corresponding composition code, decoding needs business's code, complementary and poor bit code, and wherein poor bit code is to read forward 8 from last encapsulation separation code;
2, use the inverse operation of the step 2 of compression section to decode to each several part composition code.
Claims (5)
1. the lossless compression method of processing based on binary digit, is characterized in that:
1) this compression method is processed based on binary digit, increases data compression space, can share with other lossless compression algorithms;
2) this compression method single compression ratio is at 10%--50%, but can repeatedly compress, and further improves overall compression ratio, and judges optimal compression number of times by verification scheme;
3) this compression method can, by dynamically selecting strategy, be selected optimal compression threshold value at pretreatment stage;
4) based on complementation thought, calculate business's code, complementary and poor bit code etc. and form code;
5) according to the composition code calculating, select or design encapsulation separation code;
6) this compression method occupying system resources is less, and reduces with the raising of single compression ratio;
7) this compression method has strong applicability, is applicable to file or the code stream of various forms.
2. the binary digit as described in right 1 is processed, it is characterized in that: 8 binary bit value of each byte are read in step-by-step, and read continuously, result is to obtain 0,1 character string that length is file or code stream length * 8, this character string is used for choosing compression threshold and forms yardage to be calculated.
3. as described in right 1, dynamically select strategy, in 0,1 character string that first statistics early stage generates, continuous 0 or 1 length and occurrence number, then call according to statistics the mechanism of dynamically selecting, and chooses the compression threshold h that can realize maximum compression ratio
0and h
1.
4. as described in right 1, based on complementation thought, calculate business's code, complementary and poor bit code, be that 0,1 string sort to generating early stage is considered, and carry out complementation calculating, generate business's code and complementary.After calculating finishes, by business's code and complementary, by 8 bytes store, 8 of last less thaies are with 0 polishing, and 0 number that business's code is needed is as poor bit code, for judging the effective business's code after storage.
5. the selection as described in right 1 or design encapsulate separation code, as encapsulation separation code according to the specific characters such as FFD8 of the composition code selective system setting calculating, if the specific character of default can not meet compartmentation, or repeat with partial character in the business's code producing, complementary, the specific character by default generates available encapsulation separator.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310526065.5A CN103546161A (en) | 2013-10-31 | 2013-10-31 | Lossless compression method based on binary processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310526065.5A CN103546161A (en) | 2013-10-31 | 2013-10-31 | Lossless compression method based on binary processing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103546161A true CN103546161A (en) | 2014-01-29 |
Family
ID=49969278
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310526065.5A Pending CN103546161A (en) | 2013-10-31 | 2013-10-31 | Lossless compression method based on binary processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103546161A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105206306A (en) * | 2014-05-28 | 2015-12-30 | 擎泰科技股份有限公司 | Method for processing error correction code in nonvolatile memory and nonvolatile memory device |
CN105337617A (en) * | 2015-12-09 | 2016-02-17 | 浙江维融电子科技股份有限公司 | Method for efficiently compressing full service network (FSN) files |
CN105790768A (en) * | 2014-12-19 | 2016-07-20 | 珠海全志科技股份有限公司 | Data storage method and system |
CN111026748A (en) * | 2019-11-05 | 2020-04-17 | 广州市玄武无线科技股份有限公司 | Data compression method, device and system for network access frequency control |
CN113824448A (en) * | 2020-06-19 | 2021-12-21 | 商志营 | A data compression method and system for digitizing electronic records |
CN113868206A (en) * | 2021-10-08 | 2021-12-31 | 八十一赞科技发展(重庆)有限公司 | A data compression method, decompression method, device and storage medium |
CN114040030A (en) * | 2021-11-18 | 2022-02-11 | 深圳智慧林网络科技有限公司 | A data compression method, device, device and medium based on preset rules |
CN115499016A (en) * | 2022-11-15 | 2022-12-20 | 中科声龙科技发展(北京)有限公司 | Method, device and equipment for processing data based on binary system and storage medium |
CN117082154A (en) * | 2023-10-16 | 2023-11-17 | 长沙瑞腾信息技术有限公司 | Big data-based double-path server data storage system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5818368A (en) * | 1997-04-18 | 1998-10-06 | Premier Research, Llc | Method and apparatus for lossless digital data compression |
CN101807924A (en) * | 2010-03-17 | 2010-08-18 | 黄斐芝 | Method for carrying out lossless coding compression on binary data |
CN101977061A (en) * | 2010-10-19 | 2011-02-16 | 广西师范大学 | Lossless compression and decompression method for general information |
-
2013
- 2013-10-31 CN CN201310526065.5A patent/CN103546161A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5818368A (en) * | 1997-04-18 | 1998-10-06 | Premier Research, Llc | Method and apparatus for lossless digital data compression |
CN1257621A (en) * | 1997-04-18 | 2000-06-21 | 首要研究有限公司 | Method and apparatus for lossless digital data compression |
CN101807924A (en) * | 2010-03-17 | 2010-08-18 | 黄斐芝 | Method for carrying out lossless coding compression on binary data |
CN101977061A (en) * | 2010-10-19 | 2011-02-16 | 广西师范大学 | Lossless compression and decompression method for general information |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105206306A (en) * | 2014-05-28 | 2015-12-30 | 擎泰科技股份有限公司 | Method for processing error correction code in nonvolatile memory and nonvolatile memory device |
CN105790768A (en) * | 2014-12-19 | 2016-07-20 | 珠海全志科技股份有限公司 | Data storage method and system |
CN105790768B (en) * | 2014-12-19 | 2018-12-25 | 珠海全志科技股份有限公司 | Date storage method and system |
CN105337617A (en) * | 2015-12-09 | 2016-02-17 | 浙江维融电子科技股份有限公司 | Method for efficiently compressing full service network (FSN) files |
CN105337617B (en) * | 2015-12-09 | 2018-10-26 | 浙江维融电子科技股份有限公司 | A kind of FSN files high-efficiency compression method |
CN111026748A (en) * | 2019-11-05 | 2020-04-17 | 广州市玄武无线科技股份有限公司 | Data compression method, device and system for network access frequency control |
CN113824448A (en) * | 2020-06-19 | 2021-12-21 | 商志营 | A data compression method and system for digitizing electronic records |
CN113868206A (en) * | 2021-10-08 | 2021-12-31 | 八十一赞科技发展(重庆)有限公司 | A data compression method, decompression method, device and storage medium |
CN114040030A (en) * | 2021-11-18 | 2022-02-11 | 深圳智慧林网络科技有限公司 | A data compression method, device, device and medium based on preset rules |
CN114040030B (en) * | 2021-11-18 | 2023-11-24 | 深圳智慧林网络科技有限公司 | A data compression method, device, equipment and medium based on preset rules |
CN115499016A (en) * | 2022-11-15 | 2022-12-20 | 中科声龙科技发展(北京)有限公司 | Method, device and equipment for processing data based on binary system and storage medium |
CN117082154A (en) * | 2023-10-16 | 2023-11-17 | 长沙瑞腾信息技术有限公司 | Big data-based double-path server data storage system |
CN117082154B (en) * | 2023-10-16 | 2023-12-15 | 长沙瑞腾信息技术有限公司 | Big data-based double-path server data storage system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103546161A (en) | Lossless compression method based on binary processing | |
US10834415B2 (en) | Devices for compression/decompression, system, chip, and electronic device | |
CN102970043B (en) | A kind of compression hardware system based on GZIP and accelerated method thereof | |
US8300966B2 (en) | Image signal encoding method and decoding method, information source encoding method and decoding method, apparatuses therefor, programs therefor, and storage media which store the programs to process gaussian integer signal | |
CN106549673B (en) | Data compression method and device | |
CN103858433A (en) | Hierarchical entropy encoding and decoding | |
CN113630125B (en) | Data compression, encoding and decompression method, device, electronic equipment and storage medium | |
CN112399181B (en) | Image coding and decoding method, device and storage medium | |
CN105120276B (en) | Adaptive M otion JPEG coding methods and system | |
US12347150B2 (en) | System and method for scene graph lossless compression by context-based graph convolution | |
CN114501011B (en) | Image compression method, image decompression method and device | |
CN113852379A (en) | Data encoding method, system, equipment and computer readable storage medium | |
CN102880703A (en) | Methods and systems for encoding and decoding Chinese webpage data | |
CN105791819B (en) | The decompression method and device of a kind of frame compression method of image, image | |
CN105409129A (en) | Encoder apparatus, decoder apparatus and method | |
CN104077272B (en) | A kind of method and apparatus of dictionary compression | |
CN111918071A (en) | Data compression method, device, equipment and storage medium | |
CN104636377A (en) | Data compression method and equipment | |
CN103746701B (en) | A kind of fast coding option selection method for Rice lossless data compressions | |
CN103517022B (en) | A kind of Image Data Compression and decompression method, device | |
CN116723333B (en) | Segmentable video coding methods, devices and products based on semantic information | |
WO2023237121A1 (en) | Data processing method and apparatus and related device | |
CN117197262A (en) | Semantic scalable image coding method, system, device and storage medium | |
CN107172425A (en) | Reduced graph generating method, device and terminal device | |
CN117915107B (en) | Image compression system, image compression method, storage medium and chip |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140129 |