CN106325834A - Android installation package compression method and device - Google Patents

Android installation package compression method and device Download PDF

Info

Publication number
CN106325834A
CN106325834A CN201510342068.2A CN201510342068A CN106325834A CN 106325834 A CN106325834 A CN 106325834A CN 201510342068 A CN201510342068 A CN 201510342068A CN 106325834 A CN106325834 A CN 106325834A
Authority
CN
China
Prior art keywords
file
compressed
apk
compression
module
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
Application number
CN201510342068.2A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510342068.2A priority Critical patent/CN106325834A/en
Publication of CN106325834A publication Critical patent/CN106325834A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The embodiment of the invention discloses an Android installation package compression method and device, used for reducing the volume of an APK installation package, reducing the flow generated in a transmission process, saving network transmission flow resources, and reducing the cost. The method in the embodiment of the invention comprises the following steps of: determining a to-be-compressed file needing to be added into an APK file, compressing the to-be-compressed file by adopting a Deflate compression algorithm realized based on a 7Z function library, so that a compressed file is obtained, and synthesizing the compressed file and a file, which does not need to be compressed and needs to be added into the APK file, so that the APK file is generated.

Description

Android installation kit compression method and device
Technical field
The present invention relates to Android installation kit compression field, particularly relate to Android installation kit compression method and device.
Background technology
APK is the abbreviation of Android Package, i.e. Android installation kit.By APK file is direct Pass to Android Android simulator or Android phone perform get final product set up applications.In order to improve Efficiency of transmission, saves memory space, is typically necessary and is compressed some files in APK file, Automatization's strapping tool in Android kit when the concrete file needing compression can be packed by APK (android assert packaging tool, aapt) determines.
At present, APK is compressed by the general Deflate compression algorithm using ZLIB function library to realize, Wherein, ZLIB is a compression algorithm function library increased income that Android acquiescence uses, and Deflate is one Plant disc driver and disk (ZIP) the compression algorithm title of high storage density.
But, in actual applications, the APK installation kit using this ZLIB function library to obtain needs for Taking bigger memory space, the flow produced in transmitting procedure can be caused relatively big, transmission cost is higher.
Summary of the invention
Embodiments provide Android installation kit compression method and device, be used for reducing APK installation kit Volume, reduce the flow produced in transmitting procedure, save network traffic flow resource, reduce cost.
A kind of Android installation kit compression method, including:
At Android installation kit APK file generation phase, determine that needing to add treating in APK file to presses Contracting file;
Use the Deflate compression algorithm realized based on 7Z function library, described file to be compressed is pressed Contracting, obtains the file compressed;
Synthesize file that described compression completes and need the literary composition that need not compression adding in APK file Part, generates APK file.
A kind of Android installation kit compression method, including:
Determining the compressed file in APK file and uncompressed file, described compressed file is for being used The file that Deflate compression algorithm based on the realization of ZLIB function library is compressed, described uncompressed file is The file not compressed in described APK file;
Compressed file described in decompression, and use the Deflate compression algorithm realized based on 7Z function library, File after decompression is re-compressed, obtains the file that weight has contracted;
Synthesize the uncompressed file in the file and described APK file that described weight contracted, generate weight APK file after contracting.
A kind of compressor, including:
First determines module, at APK file generation phase, determines and needs to add APK file to In file to be compressed;
Compression module, for using the Deflate compression algorithm realized based on 7Z function library, to described the One determines that the file to be compressed that module determines is compressed, and obtains the file compressed;
First generation module, for the file compressed by described compression module and APK to be added to The file that need not compression in file, adds in APK file, generates APK file.
A kind of compressor, including:
Second determines module, for determining the compressed file in APK file and uncompressed file, described Compressed file is to be used the file that Deflate compression algorithm based on the realization of ZLIB function library is compressed, Described uncompressed file is the file not compressed in described APK file;
Weight compression module, determines, for decompressing described second, the compressed file that module determines, and uses base In the Deflate compression algorithm that 7Z function library realizes, the file after decompression is re-compressed, obtains weight The file contracted;
Second generation module, for synthesizing the file and described second that described heavy compression module weight has contracted Determine the uncompressed file that module determines, generate the APK file after weight contracting.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that the embodiment of the present invention In, the file to be compressed in APK file is used the Deflate compression algorithm realized based on 7Z function library It is compressed, thus obtains compression ratio more than using the Deflate compression calculation realized based on ZLIB function library The APK file of method compression, reduces the volume of APK installation kit, decreases generation in transmitting procedure Flow, saves network traffic flow resource, reduces cost.
Accompanying drawing explanation
Fig. 1 is one schematic flow sheet of Android installation kit compression method in the embodiment of the present invention;
Fig. 2 is another schematic flow sheet of Android installation kit compression method in the embodiment of the present invention;
Fig. 3 is one structural representation of compressor in the embodiment of the present invention;
Fig. 4 is another structural representation of compressor in the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and It is not all, of embodiment.Based on the embodiment in the present invention, those skilled in the art are not making wound The every other embodiment obtained under the property made work premise, broadly falls into the scope of protection of the invention.
Embodiments provide Android installation kit compression method and device, be used for reducing APK installation kit Volume, reduce the flow produced in transmitting procedure, save network traffic flow resource, reduce cost.
In the present invention, term " 7Z function library " is a compression algorithm function library increased income, and 7Z function library is The function library used during 7Z compression, wherein 7Z can use multiple compression algorithm efficiently for a kind of main flow Carry out the compressed format of data compression, owing to 7z has been disclosed structure editing function, so it can be supported Any compression algorithm.
In the present invention, term " Deflate compression algorithm " is a kind of ZIP compression algorithm title, and Deflate is It is simultaneously used a lossless data compression of LZ77 algorithm and Huffman encoding (Huffman Coding) Algorithm.It is initially to be filed defined in the instrument second edition by the PKZIP that Phil Katz is him, fixed later Justice is in RFC 1951 specification, and current APK kit is also general during generating gives tacit consent to use Deflate Compression algorithm.
In the present invention, term " ZLIB function library " is the compression algorithm function that a Android acquiescence uses Storehouse.
It should be noted that owing to Android bottom is based on linux system, linux system is extensively adopted By ZLIB function library as compression storehouse, therefore, use ZLIB also given tacit consent to by the strapping tool of android system Function library carries out the compression of file.And the present invention breaks through conventional thought and technology barriers, through repeatedly trying Test, again use 7Z function library to carry out the compression of APK file, by the contrast of actual compression result, So that the compression ratio of APK file improves 2% to 10%.
In actual applications, 7Z function library can be used to come APK literary composition in the different phase of APK file Part is compressed: one is the generation phase in APK file, directly uses 7Z function library to APK literary composition Part is compressed, and generates APK file;Another is to use ZLIB function library as compression storehouse After obtaining APK file, then use 7Z function library again to the compressed file using ZLIB function library to obtain Carry out weight contracting, obtain the APK file that weight has contracted.Separately below different embodiments to this two The situation of kind is described:
One, at the generation phase of APK file:
Referring to Fig. 1, in the embodiment of the present invention, one embodiment of Android installation kit compression method includes:
101, at APK file generation phase, the literary composition to be compressed needing to add in APK file is determined Part;
APK file comprises multiple file, in order to save memory space and the network traffic flow of APK, The partial document added in APK file is compressed, and which file needs compression and Android System reads relevant with running APK mechanism, determines that some file can not compress, otherwise exist during APK packing Cannot cannot run after reading or installing during installation, other files then need compression.
In this step, at APK file generation phase, compressor determines to be needed to add APK file to In compressed file.
Optionally, the automatization strapping tool aapt during compressor can use Android kit determines to be needed File to be compressed in APK file to be added to;
Optionally, compressor can also read the listed files to be compressed of preset storage to determine that needs add The file to be compressed being added in APK file.
Can be in the way of the determination file to be compressed having other, which kind of mode specifically chosen can be according to reality Border situation determines, is not construed as limiting herein.
102, use the Deflate compression algorithm realized based on 7Z function library, described file to be compressed is entered Row compression, obtains the file compressed;
After compressor determines file to be compressed, the Deflate compression realized based on 7Z function library is used to calculate Method, is compressed this file to be compressed, obtains the file compressed.
It is understood that according to practical situations, file one by one can be compressed respectively, it is possible to To compress multiple file simultaneously, it is not construed as limiting herein.
103, synthesize file that described compression completes and needing to add to APK file need not pressure The file of contracting, generates APK file.
The Deflate compression algorithm that file to be compressed uses 7Z function library to realize has been compressed by compressor After, synthesize the file compressed and need the file that need not compression adding in APK file, Generate APK file.
It is understood that for the compression ratio reaching maximum as far as possible, determine for any one APK, which file needs to add in APK file, the file needing to add in APK file which Needing compression, which need not compression, all determines that.Concrete, can be determined by aapt instrument.
In the embodiment of the present invention, the file to be compressed in APK file is used based on 7Z letter by compressor The Deflate compression algorithm that number storehouse realizes is compressed, thus obtains compression ratio more than using based on ZLIB The APK file of the Deflate compression algorithm compression that function library realizes, reduces the volume of APK installation kit, Decrease the flow produced in transmitting procedure, save network traffic flow resource, reduce cost.
In above example, use the Deflate compression algorithm realized based on 7Z function library, treat described Compressed file is compressed, and in actual applications, can also select the value of multiple compression parameters during compression:
Based in the Deflate compression algorithm that 7Z function library realizes, the compression ratio affecting APK installation kit has Following parameter:
1, compression level:
Compression level has 6 kinds, for { 0,1,3,5,7,9}, wherein 0 expression is not compressed, and 9 represent poles Pressure limiting is contracted, and numeral is the biggest, and compression level is the highest.
2, NumFastBytes:
Representing the word size arranging Deflate encoder, digital scope is 3 to 258, for another shadow Ringing the parameter of compression ratio, increase numeral, compression ratio slightly improves.
3, NumPasses:
Representing the transmission size arranging Deflate encoder, digital scope is 1 to 15, for another shadow Ringing the parameter of compression ratio, increase numeral, compression ratio slightly improves;
As another embodiment of Android installation kit compression method in the embodiment of the present invention, in above example, Use the Deflate compression algorithm realized based on 7Z function library, described file to be compressed be compressed, Being specifically as follows, selecting compression level is 9, and NumFastBytes is in 128,195,256 or 258 Any one, NumPasses is 15, is compressed described file to be compressed.
It is understood that according to practical situations, above-mentioned parameter can also be taken during compression other values, It is not construed as limiting herein.It should be noted that only calculate in the Deflate compression realized based on 7Z function library Method there is NumFastBytes and NumPasses the two affect the parameter of compression ratio, based on ZLIB The Deflate compression algorithm that function library realizes does not has.
In the embodiment of the present invention, by choosing the value of the parameter affecting compression ratio so that compression obtains APK file volume is less, further decreases the flow produced in transmitting procedure, saves network and passes Defeated floating resources, reduces cost.
For ease of understanding, with a concrete application scenarios, Android installation kit in the embodiment of the present invention is compressed below Method is specifically described:
At APK file generation phase, compressor determines 10 literary compositions needing to add in APK file Part there are 4 files can not compress, cannot run, then after may result in the APK installation of generation after compression Determining that these 4 files are the file that need not compression, other 6 files are file to be compressed;
The Deflate compression algorithm that compressor employing realizes based on 7Z function library, selection compression level is 9, NumFastBytes is 258, and NumPasses is 15, compresses this 6 literary compositions to be compressed the most respectively Part, obtains the file that 6 compressions complete;
The file these 6 compressions completed and 4 file packings that need not compression, then generate APK File, the Deflate compression algorithm that this APK file realizes based on ZLIB function library relative to employing is carried out The APK file of compression, compression ratio is less.
Two, after the generation of APK file:
Referring to Fig. 2, in the embodiment of the present invention, another embodiment of Android installation kit compression method includes:
201, the compressed file in APK file and uncompressed file are determined;
Wherein, described compressed file is to be used the Deflate compression realized based on ZLIB function library to calculate The file that method is compressed, described uncompressed file is the file not compressed;
For the APK literary composition using the Deflate compression algorithm realized based on ZLIB function library to compress Part, compressor determines the compressed file in this APK file and uncompressed file.
It is understood that in actual applications, compressor can each in this APK file File, is successively read and determines whether for compressed file, be defined as after compressed file by this document voluntarily Subsequent step, until having read all files in APK file;Compressor can also first determine this Whole compressed files in APK file, then perform subsequent step, it is not construed as limiting herein.
202, compressed file described in decompression, and use the Deflate compression realized based on 7Z function library to calculate Method, re-compresses the file after decompression, obtains the file that weight has contracted;
After compressor determines the compressed file in APK file, decompress this compressed file, and use The Deflate compression algorithm realized based on 7Z function library, re-compresses the file after this decompression, obtains The file that weight has contracted.
If during it is understood that decompress, being that file determines whether to have compressed, successively successively one by one Decompress, then during weight contracting, can be to the file weight successively contracting after decompressing;If decompress, Be first to determine whole compressed files, then decompress, then during weight contracting, can the most successively Compression, it is also possible to multiple files compress together, are not construed as limiting herein.
203, file and described uncompressed file that described weight has contracted are synthesized, after generating weight contracting APK file.
Compressor synthesizes file and the uncompressed file that weight has contracted, and generates the APK literary composition after weight contracting Part.
In the embodiment of the present invention, the compressor APK file to having generated uses based on 7Z function library real Existing Deflate compression algorithm re-compresses, and obtains the APK file that volume is less, reduces APK The volume of installation kit, decreases the flow produced in transmitting procedure, saves network traffic flow resource, Reduce cost.
In above example, use the Deflate compression algorithm realized based on 7Z function library, after decompression File re-compress, in actual applications, the value of multiple compression parameters during compression, can also be selected:
Optionally, as another embodiment of Android installation kit compression method, Fig. 2 in the embodiment of the present invention In illustrated embodiment: use the Deflate compression algorithm realized based on 7Z function library, to the literary composition after decompression Part re-compresses, and specifically may include that and uses the Deflate compression algorithm realized based on 7Z function library, Selecting compression level is 9, and NumFastBytes is any one in 128,195,256 or 258, NumPasses is 15, re-compresses the file after decompression.
It is understood that according to practical situations, above-mentioned parameter can also be taken other during weight contracting Value, is not construed as limiting herein.It should be noted that only in the Deflate pressure realized based on 7Z function library Compression algorithm has NumFastBytes and NumPasses the two affect the parameter of compression ratio, based on The Deflate compression algorithm that ZLIB function library realizes does not has.
In the embodiment of the present invention, by choosing the value of the parameter affecting compression ratio so that weight contracting obtains APK file volume less, further decrease in transmitting procedure produce flow, save network Delivery flow rate resource, reduces cost.
For ease of understanding, below with another concrete application scenarios to Android installation kit pressure in the embodiment of the present invention Compression method is specifically described:
One uses the Deflate compression algorithm realized based on ZLIB function library to compress the APK file obtained In, there are 7 compressed file and 3 uncompressed files;
Compressor reads one of them file by file default order, it is judged that whether this document is to press Contracting file, if not compressed file, reads the next one by this default sequence;If compressed file, Decompression this document, and use Deflate compression algorithm based on the realization of 7Z function library to decompressing the literary composition obtained Part carries out weight contracting, and the file after weight being contracted adds in new APK file;
So circulation, until having read 10 whole files, finally gives employing based on 7Z function library Realize Deflate compression algorithm weight contracting APK file, this APK file relative to use based on The APK file that the Deflate compression algorithm that ZLIB function library realizes is compressed, compression ratio is less.
Below the compressor in the embodiment of the present invention is described, refers to Fig. 3, the embodiment of the present invention One embodiment of middle compressor includes:
First determines module 301, at APK file generation phase, determines and needs to add APK literary composition to File to be compressed in part;
Compression module 302, for using the Deflate compression algorithm realized based on 7Z function library, to described First determines that the file to be compressed that module 301 determines is compressed, and obtains the file compressed;
First generation module 303, for synthesizing file that described compression module 302 compressed and to add The file that need not compression being added in APK file, generates APK file.
In the embodiment of the present invention, the file to be compressed in APK file is used based on 7Z by compression module 302 The Deflate compression algorithm that function library realizes is compressed, thus obtains compression ratio more than using based on ZLIB The APK file of the Deflate compression algorithm compression that function library realizes, reduces the volume of APK installation kit, Decrease the flow produced in transmitting procedure, save network traffic flow resource, reduce cost.
Optionally, as another embodiment of compressor in the embodiment of the present invention, above-mentioned first determines mould Block 301 specifically for, at APK file generation phase, use the automatization baler in Android kit Tool aapt determines the described file to be compressed needing and adding in APK file.
In the embodiment of the present invention, aapt instrument is used to determine file to be compressed so that the result determined is more Accurately, the process determined is more quick, improves the speed producing APK.
Optionally, as another embodiment of compressor in the embodiment of the present invention, above-mentioned compression module 302 Specifically for, use the Deflate compression algorithm realized based on 7Z function library, selecting compression level is 9, NumFastBytes is any one in 128,195,256 or 258, and NumPasses is 15, to described File to be compressed is compressed, and obtains the file compressed.
In the embodiment of the present invention, compression module 302, by choosing the value of the parameter affecting compression ratio, makes The APK file volume obtained must be compressed less, further decrease the flow produced in transmitting procedure, Save network traffic flow resource, reduce cost.
Referring to Fig. 4, in the embodiment of the present invention, another embodiment of compressor includes:
Second determines module 401, for determining the compressed file in APK file and uncompressed file, Described compressed file be used based on ZLIB function library realize Deflate compression algorithm compressed File, described uncompressed file is the file not compressed in described APK file;
Weight compression module 402, determines, for decompressing described second, the compressed file that module 401 determines, and Use the Deflate compression algorithm realized based on 7Z function library, the file after decompression is re-compressed, The file contracted to weight;
Second generation module 403, for synthesizing file and the institute that described heavy compression module 402 weight has contracted State second and determine the uncompressed file that module 401 determines, generate the APK file after weight contracting.
In the embodiment of the present invention, the weight compression module 402 APK file to having generated uses based on 7Z letter The Deflate compression algorithm that number storehouse realizes re-compresses, and obtains the APK file that volume is less, subtracts The little volume of APK installation kit, decreases the flow produced in transmitting procedure, saves network transmission stream Amount resource, reduces cost.
Optionally, as another embodiment of compressor in the embodiment of the present invention, above-mentioned heavy compression module 402 specifically for, decompress described second and determine the compressed file that module 401 determines, and use based on The Deflate compression algorithm that 7Z function library realizes, selecting compression level is 9, NumFastBytes is 128, 195, in 256 or 258 any one, NumPasses is 15, re-compresses the file after decompression, The file contracted to weight.
In the embodiment of the present invention, weight compression module 402 passes through to choose the value of the parameter affecting compression ratio, The APK file volume that weight contracting is obtained is less, further decreases the stream produced in transmitting procedure Amount, saves network traffic flow resource, reduces cost.
Those skilled in the art is it can be understood that arrive, and for convenience and simplicity of description, above-mentioned retouches The specific works process of the system stated, device and unit, is referred to the correspondence in preceding method embodiment Process, does not repeats them here.
In several embodiments provided herein, it should be understood that disclosed system, device and Method, can realize by another way.Such as, device embodiment described above is only shown Meaning property, such as, the division of described unit, be only a kind of logic function and divide, actual can when realizing There to be other dividing mode, the most multiple unit or assembly can in conjunction with or be desirably integrated into another System, or some features can ignore, or do not perform.Another point, shown or discussed each other Coupling direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, device or unit Or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, makees The parts shown for unit can be or may not be physical location, i.e. may be located at a place, Or can also be distributed on multiple NE.Can select according to the actual needs part therein or The whole unit of person realizes the purpose of the present embodiment scheme.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit In, it is also possible to it is that unit is individually physically present, it is also possible to two or more unit are integrated in one In individual unit.Above-mentioned integrated unit both can realize to use the form of hardware, it would however also be possible to employ software merit The form of energy unit realizes.
If described integrated unit realizes and as independent production marketing using the form of SFU software functional unit Or when using, can be stored in a computer read/write memory medium.Based on such understanding, this The part that the most in other words prior art contributed of technical scheme of invention or this technical scheme Completely or partially can embody with the form of software product, this computer software product is stored in one In storage medium, including some instructions with so that computer equipment (can be personal computer, Server, or the network equipment etc.) perform completely or partially walking of method described in each embodiment of the present invention Suddenly.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), The various medium that can store program code such as magnetic disc or CD.
The above, above example only in order to technical scheme to be described, is not intended to limit; Although being described in detail the present invention with reference to previous embodiment, those of ordinary skill in the art should Work as understanding: the technical scheme described in foregoing embodiments still can be modified by it, or to it Middle part technical characteristic carries out equivalent;And these amendments or replacement, do not make appropriate technical solution Essence depart from various embodiments of the present invention technical scheme spirit and scope.

Claims (10)

1. an Android installation kit compression method, it is characterised in that including:
At Android installation kit APK file generation phase, determine that needing to add treating in APK file to presses Contracting file;
Use the Deflate compression algorithm realized based on 7Z function library, described file to be compressed is pressed Contracting, obtains the file compressed;
Synthesize file that described compression completes and need the literary composition that need not compression adding in APK file Part, generates APK file.
Method the most according to claim 1, it is characterised in that described determine need to add APK to File to be compressed in file, specifically includes:
The automatization strapping tool aapt in Android kit is used to determine that described needs adds APK file to In file to be compressed.
Method the most according to claim 1 and 2, it is characterised in that described to described literary composition to be compressed Part is compressed, and specifically includes:
Selecting compression level is 9, and word size NumFastBytes of encoder is 128,195,256 Or in 258 any one, transmission size NumPasses of encoder is 15, enters described file to be compressed Row compression.
4. an Android installation kit compression method, it is characterised in that including:
Determining the compressed file in APK file and uncompressed file, described compressed file is for being used The file that Deflate compression algorithm based on the realization of ZLIB function library is compressed, described uncompressed file is The file not compressed in described APK file;
Compressed file described in decompression, and use the Deflate compression algorithm realized based on 7Z function library, File after decompression is re-compressed, obtains the file that weight has contracted;
Synthesize the uncompressed file in the file and described APK file that described weight contracted, generate weight APK file after contracting.
Method the most according to claim 4, it is characterised in that described to decompression after file again Compression, specifically includes:
Selecting compression level is 9, and NumFastBytes is any one in 128,195,256 or 258, NumPasses is 15, re-compresses the file after decompression.
6. a compressor, it is characterised in that including:
First determines module, at APK file generation phase, determines and needs to add APK file to In file to be compressed;
Compression module, for using the Deflate compression algorithm realized based on 7Z function library, to described the One determines that the file to be compressed that module determines is compressed, and obtains the file compressed;
First generation module, for the file compressed by described compression module and APK to be added to The file that need not compression in file, adds in APK file, generates APK file.
Device the most according to claim 6, it is characterised in that described first determines that module is specifically used In, at APK file generation phase, use the automatization strapping tool aapt in Android kit to determine institute State the file to be compressed needing to add in APK file.
8. according to the device described in claim 6 or 7, it is characterised in that described compression module is specifically used In, use the Deflate compression algorithm realized based on 7Z function library, selecting compression level is 9, NumFastBytes is any one in 128,195,256 or 258, and NumPasses is 15, to described File to be compressed is compressed, and obtains the file compressed.
9. a compressor, it is characterised in that including:
Second determines module, for determining the compressed file in APK file and uncompressed file, described Compressed file is to be used the file that Deflate compression algorithm based on the realization of ZLIB function library is compressed, Described uncompressed file is the file not compressed in described APK file;
Weight compression module, determines, for decompressing described second, the compressed file that module determines, and uses base In the Deflate compression algorithm that 7Z function library realizes, the file after decompression is re-compressed, obtains weight The file contracted;
Second generation module, for synthesizing the file and described second that described heavy compression module weight has contracted Determine the uncompressed file that module determines, generate the APK file after weight contracting.
Device the most according to claim 9, it is characterised in that described heavy compression module is specifically used In, decompress described second and determine the compressed file that module determines, and use based on the realization of 7Z function library Deflate compression algorithm, selecting compression level is 9, and NumFastBytes is 128,195,256 or 258 In any one, NumPasses is 15, to decompression after file re-compress, obtain what weight had contracted File.
CN201510342068.2A 2015-06-18 2015-06-18 Android installation package compression method and device Pending CN106325834A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510342068.2A CN106325834A (en) 2015-06-18 2015-06-18 Android installation package compression method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510342068.2A CN106325834A (en) 2015-06-18 2015-06-18 Android installation package compression method and device

Publications (1)

Publication Number Publication Date
CN106325834A true CN106325834A (en) 2017-01-11

Family

ID=57732592

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510342068.2A Pending CN106325834A (en) 2015-06-18 2015-06-18 Android installation package compression method and device

Country Status (1)

Country Link
CN (1) CN106325834A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775781A (en) * 2017-02-17 2017-05-31 北京金山安全软件有限公司 Method and device for reducing application installation packages and electronic equipment
CN111352634A (en) * 2018-12-21 2020-06-30 北京字节跳动网络技术有限公司 Installation package construction method, electronic device and storage medium
CN112765112A (en) * 2021-01-22 2021-05-07 苏州浪潮智能科技有限公司 Installation package packing and unpacking method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763269A (en) * 2010-01-27 2010-06-30 中兴通讯股份有限公司 Method for making software installation package
CN102231117A (en) * 2011-07-08 2011-11-02 盛乐信息技术(上海)有限公司 Software installment method and system for embedded platform
CN103051723A (en) * 2012-12-27 2013-04-17 广州市动景计算机科技有限公司 Increment updating method as well as server and terminal
CN104133695A (en) * 2014-07-15 2014-11-05 珠海金山网络游戏科技有限公司 Manufacture and application method of software client side

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763269A (en) * 2010-01-27 2010-06-30 中兴通讯股份有限公司 Method for making software installation package
CN102231117A (en) * 2011-07-08 2011-11-02 盛乐信息技术(上海)有限公司 Software installment method and system for embedded platform
CN103051723A (en) * 2012-12-27 2013-04-17 广州市动景计算机科技有限公司 Increment updating method as well as server and terminal
CN104133695A (en) * 2014-07-15 2014-11-05 珠海金山网络游戏科技有限公司 Manufacture and application method of software client side

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
孔维栋: ""智能变电站网络报文压缩技术的研究"", 《中国优秀硕士学位论文全文数据库 工程科技II辑》 *
无: ""7z"ultra" settings for zip format"", 《ASK UBUNTU》 *
李晶: ""CPU和GPU协同运算下的DEFLATE算法性能加速研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775781A (en) * 2017-02-17 2017-05-31 北京金山安全软件有限公司 Method and device for reducing application installation packages and electronic equipment
CN106775781B (en) * 2017-02-17 2021-04-27 北京金山安全软件有限公司 Method and device for reducing application installation packages and electronic equipment
CN111352634A (en) * 2018-12-21 2020-06-30 北京字节跳动网络技术有限公司 Installation package construction method, electronic device and storage medium
CN112765112A (en) * 2021-01-22 2021-05-07 苏州浪潮智能科技有限公司 Installation package packing and unpacking method

Similar Documents

Publication Publication Date Title
KR100894002B1 (en) Device and data method for selective compression and decompression and data format for compressed data
US7492290B1 (en) Alternative encoding for LZSS output
KR101049699B1 (en) Data Compression Method
JP6698897B2 (en) Coding and decoding of spectral peak positions
Harnik et al. A fast implementation of deflate
KR102549617B1 (en) 3d point cloud data encoding/decoding method and apparatus
CN106503165A (en) Compression, decompressing method, device and equipment
CN104199951B (en) Web page processing method and device
CN106325834A (en) Android installation package compression method and device
JP2009065674A (en) Data compression device and method
CN104811209A (en) Compressed file data embedding method and device capable of resisting longest matching detection
WO2013007171A1 (en) System and method for encoding and decoding a bitstream for a 3d model having repetitive structure
AU2012283580A1 (en) System and method for encoding and decoding a bitstream for a 3D model having repetitive structure
JP4037875B2 (en) Computer graphics data encoding device, decoding device, encoding method, and decoding method
CN111061722A (en) Data compression method, data decompression method, device and equipment
CN102263560B (en) Differential encoding method and system
CN105791819B (en) The decompression method and device of a kind of frame compression method of image, image
CN102129872B (en) Data compression and decompression method and device thereof
US10931303B1 (en) Data processing system
JP2016170750A (en) Data management program, information processor and data management method
CN112885364B (en) Audio encoding method and decoding method, audio encoding device and decoding device
CN105573775A (en) FPGA configuration file loading method and decoder
CN111431539B (en) Compression method and device for neural network data and computer readable storage medium
JP2008517495A (en) LASeR binary representation point sequence encoding / decoding method and apparatus
US20120016918A1 (en) Method for Compressing Information

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170111