CN109995373A - A kind of mixing packing compression method of integer array - Google Patents

A kind of mixing packing compression method of integer array Download PDF

Info

Publication number
CN109995373A
CN109995373A CN201810004038.4A CN201810004038A CN109995373A CN 109995373 A CN109995373 A CN 109995373A CN 201810004038 A CN201810004038 A CN 201810004038A CN 109995373 A CN109995373 A CN 109995373A
Authority
CN
China
Prior art keywords
integer
array
packaged
integer array
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.)
Granted
Application number
CN201810004038.4A
Other languages
Chinese (zh)
Other versions
CN109995373B (en
Inventor
武鹏程
方艳
高佳玲
蔡建兵
张波
孙荣卫
左兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Alarby Intelligent Technology Co Ltd
Original Assignee
Shanghai Alarby Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Alarby Intelligent Technology Co Ltd filed Critical Shanghai Alarby Intelligent Technology Co Ltd
Priority to CN201810004038.4A priority Critical patent/CN109995373B/en
Publication of CN109995373A publication Critical patent/CN109995373A/en
Application granted granted Critical
Publication of CN109995373B publication Critical patent/CN109995373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/3002Conversion to or from differential modulation
    • H03M7/3044Conversion to or from differential modulation with several bits only, i.e. the difference between successive samples being coded by more than one bit, e.g. differential pulse code modulation [DPCM]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

A kind of mixing packing compression method of integer array, it is related to field of data compression, and in particular to a kind of mixing packing compression method of integer array, the following steps are included: obtaining band compression integer array, each integer memory length is identical for it;Conversion has the integer array of symbol, and former integer is taken absolute value and moves to left one, lowest bit position records sign with 0 and 1;It traverses entire integer absolute number array and finds out median;Integer array is packaged using two different basis stored bits numbers that are packaged respectively, the integer array after forming two packings;Integer array after being packaged respectively to two with predetermined compression algorithm is compressed;After choose lesser compressed file;The basic stored bits number of packing is recorded in selected compressed file.After adopting the above technical scheme, being conducive to improve mobile terminal upgrade package transmission success rate and saving flow cost the invention has the following beneficial effects: it can reduce 10% or so compressed file amount of storage.

Description

A kind of mixing packing compression method of integer array
Technical field
The present invention relates to field of data compression, and in particular to a kind of mixing packing compression method of integer array.
Background technique
Data compression refers under the premise of not losing useful information, reduces data volume to reduce memory space, improves it Transmission, storage and processing efficiency, or data are reorganized according to certain algorithm, reduce the redundancy and storage of data A kind of technical method in space.Currently, data compression can substantially be divided into two types, one kind being called lossless compression, another It is called lossy compression, but both of which is directly compressed to file data, not only memory space is big in this way, but also presses Contracting and decompression speed are slow, and file transfer speed is also slow, and flow cost is high.
Summary of the invention
It is pressed in view of the defects and deficiencies of the prior art, the present invention intends to provide a kind of mixing of integer array is packaged Contracting method, it can reduce 10% or so compressed file amount of storage, be conducive to improve mobile terminal upgrade package transmission success in this way Rate and saving flow cost.
To achieve the above object, the present invention is using following technical scheme: it the following steps are included:
Step 1: obtaining band compression integer array, and each integer memory length of integer array is identical;
Step 2: conversion has the integer array of symbol, and former integer is taken absolute value and moves to left one, and lowest bit position is with 0 Sign is recorded with 1, this step can be omitted if it is signless integer array;
Step 3: traversing entire integer absolute number array and find out median, and the basis being packaged for heuristic search integer is deposited Store up bit number;
Step 4: integer array is packaged using two different basis stored bits numbers that are packaged respectively, forms two Integer array after packing;
Step 5: the integer array after being packaged respectively to two with predetermined compression algorithm is compressed;
Step 6: more compressed data file size chooses lesser compressed file;
Step 7: the basic stored bits number of packing is recorded in selected compressed file.
A kind of mixing of integer array is packaged compression method, and conversion has the integer array of symbol, and former integer is whole Body indicates sign with minimum bit to moving to left 1, under the premise of not influencing calculating, at the packing of integer Reason.
A kind of mixing of integer array is packaged compression method, it is opened with the median of the absolute number array of integer The basic stored bits number that hair search is packaged.
A kind of mixing of integer array is packaged compression method, it stores ratio with the basis smaller than integer memory length Special several pairs of integer arrays are packaged, and are increased the effective use of integer memory space, are reduced invalid numerical the space occupied.
The working principle of the invention: refer to Fig. 1, specific implementation process of the invention the following steps are included:
Step 101, integer array to be compressed is obtained, the length of each integer storage is consistent;
Step 102, if integer array has symbol, it is converted, former integer is whole to moving to left 1, Symbol is indicated with lowest bit position, (0 is positive number, and 1 is negative);If integer array be it is signless, this step can save Slightly;
Step 103, traversal integer absolute value array finds out median example;
Step 104, the basic stored bits number being packaged according to median, heuristic search, the present invention are found through experiments that four The packing effect of bit, eight bits and 16 bits is relatively good, thus suggest using four bits, eight bits or 16 bits into Row integer is packaged.Example: when median is 0x110111100, then being packaged basic stored bits number is eight bits and 16 ratios It is special;
Step 105, integer packing is carried out using basic stored bits number.It is as shown in Figure 2 to be packaged example: when eight bits are base When plinth stored bits number, actual storage data are rear seven bit values, and most significant bit value is used to record the complete of data Property, 1 is imperfect, 0 be it is complete, when integer is 0x110111100, first with eight bit storage 0x0111100, the highest-order bit is remembered Record 1, with eight bit storages remaining 11, highest order is recorded as 0, can be under automatic Mosaic when algorithm is read with the integer of 1 beginning One number, until reading until the integer of 0 beginning;When integer is 0x110, just with seven bit storage 0x110, highest order Bit value is 0;
Step 106, two packed integer array files are compressed using predetermined compression algorithm, is reduced to nothing Imitate the compression of the memory space of numerical value;
Step 107, the size for comparing two packing compressed files, chooses lesser packing compressed file, compresses being packaged The basic stored bits number of packing is recorded in file, it is used to decompress.
After adopting the above technical scheme, the invention has the following beneficial effects: it can reduce 10% or so compressed file storage Amount is conducive to improve mobile terminal upgrade package transmission success rate in this way and saves flow cost.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is specific implementation flow chart of the invention;
Fig. 2 is instantiation figure of the invention.
Specific embodiment
Referring to shown in Fig. 1-Fig. 2, present embodiment the technical solution adopted is that: it the following steps are included:
Step 1: obtaining band compression integer array, and each integer memory length of integer array is identical;
Step 2: conversion has the integer array of symbol, and former integer is taken absolute value and moves to left one, and lowest bit position is with 0 Sign is recorded with 1, this step can be omitted if it is signless integer array;
Step 3: traversing entire integer absolute number array and find out median, and the basis being packaged for heuristic search integer is deposited Store up bit number;
Step 4: integer array is packaged using two different basis stored bits numbers that are packaged respectively, forms two Integer array after packing;
Step 5: the integer array after being packaged respectively to two with predetermined compression algorithm is compressed;
Step 6: more compressed data file size chooses lesser compressed file;
Step 7: the basic stored bits number of packing is recorded in selected compressed file.
A kind of mixing of integer array is packaged compression method, and conversion has the integer array of symbol, and former integer is whole Body indicates sign with minimum bit to moving to left 1, under the premise of not influencing calculating, at the packing of integer Reason.
A kind of mixing of integer array is packaged compression method, it is opened with the median of the absolute number array of integer The basic stored bits number that hair search is packaged.
A kind of mixing of integer array is packaged compression method, it stores ratio with the basis smaller than integer memory length Special several pairs of integer arrays are packaged, and are increased the effective use of integer memory space, are reduced invalid numerical the space occupied.
The working principle of the invention: refer to Fig. 1, specific implementation process of the invention the following steps are included:
Step 101, integer array to be compressed is obtained, the length of each integer storage is consistent;
Step 102, if integer array has symbol, it is converted, former integer is whole to moving to left 1, Symbol is indicated with lowest bit position, (0 is positive number, and 1 is negative);If integer array be it is signless, this step can save Slightly;
Step 103, traversal integer absolute value array finds out median example;
Step 104, the basic stored bits number being packaged according to median, heuristic search, the present invention are found through experiments that four The packing effect of bit, eight bits and 16 bits is relatively good, thus suggest using four bits, eight bits or 16 bits into Row integer is packaged.Example: when median is 0x110111100, then being packaged basic stored bits number is eight bits and 16 ratios It is special;
Step 105, integer packing is carried out using basic stored bits number.It is as shown in Figure 2 to be packaged example: when eight bits are base When plinth stored bits number, actual storage data are rear seven bit values, and most significant bit value is used to record the complete of data Property, 1 is imperfect, 0 be it is complete, when integer is 0x110111100, first with eight bit storage 0x0111100, the highest-order bit is remembered Record 1, with eight bit storages remaining 11, highest order is recorded as 0, can be under automatic Mosaic when algorithm is read with the integer of 1 beginning One number, until reading until the integer of 0 beginning;When integer is 0x110, just with seven bit storage 0x110, highest order Bit value is 0;
Step 106, two packed integer array files are compressed using predetermined compression algorithm, is reduced to nothing Imitate the compression of the memory space of numerical value;
Step 107, the size for comparing two packing compressed files, chooses lesser packing compressed file, compresses being packaged The basic stored bits number of packing is recorded in file, it is used to decompress.
The above is only used to illustrate the technical scheme of the present invention and not to limit it, and those of ordinary skill in the art are to this hair The other modifications or equivalent replacement that bright technical solution is made, as long as it does not depart from the spirit and scope of the technical scheme of the present invention, It is intended to be within the scope of the claims of the invention.

Claims (4)

1. the mixing of integer array a kind of is packaged compression method, it is characterised in that: it the following steps are included:
Step 1: obtaining band compression integer array, and each integer memory length of integer array is identical;
Step 2: conversion has the integer array of symbol, and former integer is taken absolute value and moves to left one, lowest bit position with 0 and 1 come Sign is recorded, this step can be omitted if it is signless integer array;
Step 3: traversing entire integer absolute number array and find out median, the basis storage ratio being packaged for heuristic search integer Special number;
Step 4: integer array is packaged using two different basis stored bits numbers that are packaged respectively, forms two packings Integer array afterwards;
Step 5: the integer array after being packaged respectively to two with predetermined compression algorithm is compressed;
Step 6: more compressed data file size chooses lesser compressed file;
Step 7: the basic stored bits number of packing is recorded in selected compressed file.
2. a kind of mixing of integer array according to claim 1 is packaged compression method, it is characterised in that: conversion has symbol Integer array, former integer is whole to moving to left 1, indicate sign with minimum bit.
3. a kind of mixing of integer array according to claim 1 is packaged compression method, it is characterised in that: it uses integer The median of absolute number array carrys out the basic stored bits number of heuristic search packing.
4. a kind of mixing of integer array according to claim 1 is packaged compression method, it is characterised in that: it is with than integer The small basic stored bits number of memory length is packaged integer array.
CN201810004038.4A 2018-01-03 2018-01-03 Mixed packing compression method for integer arrays Active CN109995373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810004038.4A CN109995373B (en) 2018-01-03 2018-01-03 Mixed packing compression method for integer arrays

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810004038.4A CN109995373B (en) 2018-01-03 2018-01-03 Mixed packing compression method for integer arrays

Publications (2)

Publication Number Publication Date
CN109995373A true CN109995373A (en) 2019-07-09
CN109995373B CN109995373B (en) 2023-08-15

Family

ID=67128968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810004038.4A Active CN109995373B (en) 2018-01-03 2018-01-03 Mixed packing compression method for integer arrays

Country Status (1)

Country Link
CN (1) CN109995373B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0427884A1 (en) * 1989-11-14 1991-05-22 Siemens Nixdorf Informationssysteme Aktiengesellschaft Method and device for data compression and decompression
CN101008890A (en) * 2007-01-30 2007-08-01 金蝶软件(中国)有限公司 Compression and uncompression method of integral data and device thereof
WO2009001174A1 (en) * 2007-06-28 2008-12-31 Smartimage Solutions, Sia System and method for data compression and storage allowing fast retrieval
CN102457283A (en) * 2010-10-28 2012-05-16 阿里巴巴集团控股有限公司 Data compression and decompression method and equipment
CN102708187A (en) * 2012-05-14 2012-10-03 成都信息工程学院 Reverse index mixed compression and decompression method based on Hbase database
CN102737132A (en) * 2012-06-25 2012-10-17 天津神舟通用数据技术有限公司 Multi-rule combined compression method based on database row and column mixed storage
CN103067022A (en) * 2012-12-19 2013-04-24 中国石油天然气集团公司 Nondestructive compressing method, uncompressing method, compressing device and uncompressing device for integer data
CN103516369A (en) * 2013-06-20 2014-01-15 易乐天 Method and system for self-adaptation data compression and decompression and storage device
CN103685589A (en) * 2012-09-07 2014-03-26 中国科学院计算机网络信息中心 Binary coding-based domain name system (DNS) data compression and decompression methods and systems
CN104199927A (en) * 2014-09-03 2014-12-10 腾讯科技(深圳)有限公司 Data processing method and device
WO2015117407A1 (en) * 2014-08-26 2015-08-13 中兴通讯股份有限公司 Processing method and device for terminal information
CN106549673A (en) * 2016-10-27 2017-03-29 深圳市金证科技股份有限公司 A kind of data compression method and device
CN106685429A (en) * 2016-12-29 2017-05-17 广州华多网络科技有限公司 Integer compression method and device
CN107330030A (en) * 2017-06-23 2017-11-07 南京师范大学 A kind of hierarchical network construction method that storage is compressed towards magnanimity road net data

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0427884A1 (en) * 1989-11-14 1991-05-22 Siemens Nixdorf Informationssysteme Aktiengesellschaft Method and device for data compression and decompression
CN101008890A (en) * 2007-01-30 2007-08-01 金蝶软件(中国)有限公司 Compression and uncompression method of integral data and device thereof
WO2009001174A1 (en) * 2007-06-28 2008-12-31 Smartimage Solutions, Sia System and method for data compression and storage allowing fast retrieval
CN102457283A (en) * 2010-10-28 2012-05-16 阿里巴巴集团控股有限公司 Data compression and decompression method and equipment
CN102708187A (en) * 2012-05-14 2012-10-03 成都信息工程学院 Reverse index mixed compression and decompression method based on Hbase database
CN102737132A (en) * 2012-06-25 2012-10-17 天津神舟通用数据技术有限公司 Multi-rule combined compression method based on database row and column mixed storage
CN103685589A (en) * 2012-09-07 2014-03-26 中国科学院计算机网络信息中心 Binary coding-based domain name system (DNS) data compression and decompression methods and systems
CN103067022A (en) * 2012-12-19 2013-04-24 中国石油天然气集团公司 Nondestructive compressing method, uncompressing method, compressing device and uncompressing device for integer data
CN103516369A (en) * 2013-06-20 2014-01-15 易乐天 Method and system for self-adaptation data compression and decompression and storage device
WO2015117407A1 (en) * 2014-08-26 2015-08-13 中兴通讯股份有限公司 Processing method and device for terminal information
CN104199927A (en) * 2014-09-03 2014-12-10 腾讯科技(深圳)有限公司 Data processing method and device
CN106549673A (en) * 2016-10-27 2017-03-29 深圳市金证科技股份有限公司 A kind of data compression method and device
CN106685429A (en) * 2016-12-29 2017-05-17 广州华多网络科技有限公司 Integer compression method and device
CN107330030A (en) * 2017-06-23 2017-11-07 南京师范大学 A kind of hierarchical network construction method that storage is compressed towards magnanimity road net data

Also Published As

Publication number Publication date
CN109995373B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
CN104380267B (en) Data compression/decompression device
CN103488709B (en) A kind of index establishing method and system, search method and system
CN104462141B (en) Method, system and the storage engines device of a kind of data storage and inquiry
CN106528786B (en) Method and system of the multi-source heterogeneous power grid big data of fast transferring to HBase
CN104077405B (en) Time sequential type data access method
CN105933708B (en) A kind of method and apparatus of data compression and decompression
CN106708427A (en) Storage method suitable for key value pair data
CN101800619B (en) Interleaver or deinterleaver method and device thereof based on block interleaver
CN107423422A (en) Spatial data distributed storage and search method and system based on grid
CN107589908A (en) The merging method that non-alignment updates the data in a kind of caching system based on solid-state disk
CN116244313B (en) JSON data storage and access method, device, computer equipment and medium
CN105159616A (en) Disk space management method and device
CN104298697A (en) FAT32-format data file managing system
KR100484137B1 (en) Improved huffman decoding method and apparatus thereof
CN106202213A (en) A kind of FPGA binary file compression, decompressing method and compression, decompression device
CN110413624A (en) A method of the multiple row stored in association deposited based on column
CN109918316A (en) A kind of method and its system reducing FTL address of cache space
CN102243615A (en) Memory buffer management mechanism supporting audio/video frame storage
CN109995373A (en) A kind of mixing packing compression method of integer array
CN106776361A (en) A kind of caching method and system towards extensive non-volatile memory medium
CN107506311A (en) A kind of FTL tables of solid state hard disc write with a brush dipped in Chinese ink method and device
CN111813709B (en) High-speed parallel storage method based on FPGA (field programmable Gate array) memory and calculation integrated architecture
CN106909623A (en) A kind of data set and date storage method of supporting efficient mass data to analyze and retrieve
CN104111899A (en) Cache data storage method and system and cache data reading method
CN107436848A (en) It is a kind of to realize the method and device changed between user data and compressed data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant