CN105446975A - File packing method and device - Google Patents

File packing method and device Download PDF

Info

Publication number
CN105446975A
CN105446975A CN201410283913.9A CN201410283913A CN105446975A CN 105446975 A CN105446975 A CN 105446975A CN 201410283913 A CN201410283913 A CN 201410283913A CN 105446975 A CN105446975 A CN 105446975A
Authority
CN
China
Prior art keywords
file
directory
sub
data
described target
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
CN201410283913.9A
Other languages
Chinese (zh)
Other versions
CN105446975B (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.)
Alibaba China Co Ltd
Original Assignee
Guangzhou I9Game Information 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 Guangzhou I9Game Information Technology Co Ltd filed Critical Guangzhou I9Game Information Technology Co Ltd
Priority to CN201410283913.9A priority Critical patent/CN105446975B/en
Priority to PCT/CN2014/088278 priority patent/WO2015196621A1/en
Publication of CN105446975A publication Critical patent/CN105446975A/en
Application granted granted Critical
Publication of CN105446975B publication Critical patent/CN105446975B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Abstract

The invention provides a file packing method and device; the method comprises the following steps: traversing a target catalog according to packing compression parameters; if files under the target catalog or files under sub-catalogs of the target catalog are determined to be normal files in a traversing process, then obtaining the file data under the target catalog and file data under sub-catalog of the target catalog; writing the obtained file data under the target catalog and file data under sub-catalog of the target catalog into a packing file for packing and compression. The method and device can abandon unnecessary files, and can write the normal files as necessary files into the packing file for packing and compression, thus improving file compressing rate, further abandoning necessary file attributes and writing into the packing file, so the compressing rate can be further improved.

Description

A kind of file packing method and device
Technical field
The present invention relates to mobile internet technical field, more specifically, relate to a kind of file packing method and device.
Background technology
Along with the widespread use of mobile phone terminal and the fast development of application thereof, the various installation kits for mobile phone terminal get more and more.Installation kit (Installpack), i.e. software installation kit are can the set of decompress files voluntarily, comprising the All Files that software is installed.Run this installation kit (executable file), can the All Files of this software is discharged on mobile phone terminal, complete edit the registry, amendment Operation system setting, create the work such as shortcut.
For the application of mobile phone terminal, the volume of its installation kit is less, then the effect in channel promotion is better: installation kit is little, and user downloads, it is little to install the time cost consumed, and the error rate that may occur in downloading process is little, and natural effect can be better.
For the application installation kit based on Hybrid framework, a H5 code (html/css/js file) compressed package can be comprised in its installation kit, wherein contain application and run required necessary H5 element, the packing compress mode of zip is generally used in the industry to process, its processing mode is: compress Single document one by one, then is packed by All Files.In addition, if want to obtain higher compressing file rate, also tar packing manner can be used in the industry, use the game that the capacity that is generally of such packing manner is larger, because if use tar (http://www.gnu.org/software/tar/tar.html) packing manner, need preset tar in installation kit to pack corresponding storehouse, this storehouse is also have certain volume, for the application that some installation kits are less, tar packing compress mode is used to lose more than gain on the contrary.
Therefore, a kind of brand-new packaging method that can improve compressibility and device is needed.
Summary of the invention
In view of the above problems, the object of this invention is to provide a kind of file packing method and device, to solve the not high problem of existing packing compress mode compressibility.
Technical scheme provided by the invention is as follows:
The invention provides a kind of file packing method, comprising: according to packing compression parameters traversal target directory;
When the file judging under the sub-directory of file under described target directory or described target directory in ergodic process is ordinary file, obtain the data of the file under the data of the file under described target directory and the sub-directory of described target directory; The data of the data of file under the described target directory obtained and the file under the sub-directory of described target directory are write packaging file and compress.
Wherein, during described data write packaging file by the data of file under the described target directory that obtains and file under the sub-directory of described target directory, the attribute information of file is given up.
The method also comprises: when judging to be the sub-directory of described target directory in ergodic process, obtain the data of the sub-directory of described target directory, is compressed by the data of the sub-directory of the described target directory obtained write packaging file; Wherein, the data of described sub-directory comprise the path content data of described sub-directory and the path of described sub-directory, do not comprise the file under sub-directory.
Wherein, the data of the file under described target directory comprise the path of the content of file, the content-length of file, the path content data of file and file; The data of the file under described sub-directory comprise the path of the content of file, the content-length of file, the path content data of file and file.
Wherein, it is the attribute that calling system function obtains file in described ergodic process, after the attribute padding data structure of described file, value according to the flag of described data structure conforms to a predetermined condition, and judges that the file under the sub-directory of file under described target directory or described target directory is ordinary file.
Wherein, be that calling system function obtains the attribute of file in described ergodic process, go out according to determined property the sub-directory that content that traversal reads is file under described target directory or described target directory.
The present invention also provides a kind of file packing apparatus, comprising: target directory Traversal Unit, for traveling through target directory according to packing compression parameters; File type judging unit, in ergodic process, judge file under described target directory or described target directory sub-directory under file whether be ordinary file; File data acquiring unit, when being ordinary file for going out in described file type unit judges, obtains the data of the file under the data of the file under described target directory and the sub-directory of described target directory; Packing compression unit, for writing packaging file by the data of the file under described target directory with the data of the file under the sub-directory of described target directory and compress.
Wherein, during the data write packaging file of described packing compression unit by the data of file under the described target directory that obtains and file under the sub-directory of described target directory, the attribute information of file is given up.
This device also comprises: sub-directory data capture unit, during for judging to be the sub-directory of described target directory in described target directory Traversal Unit ergodic process, obtain the data of the sub-directory of described target directory, wherein, the data of described sub-directory comprise the path content data of described sub-directory and the path of described sub-directory, do not comprise the file under sub-directory; The data of the sub-directory of the described target directory obtained are write packaging file and compress by described packing compression unit.
Wherein, described file type judging unit is the attribute that calling system function obtains file in described ergodic process, after the attribute padding data structure of described file, value according to the flag of described data structure conforms to a predetermined condition, and judges that the file under the sub-directory of file under described target directory or described target directory is ordinary file.
Can find, utilize above-mentioned according to file packing method provided by the invention and device, by the type of the file under the sub-directory that first judges file under described target directory or described target directory in ergodic process, judge be after ordinary file using ordinary file as necessary file, non-generic file is then inessential file, gives up inessential file, is only carried out packing and compressing by necessary file write packaging file, compressing file rate can be improved, solve prior art Problems existing.
Further, after judging that ordinary file is as necessary file, give up the data (i.e. non-file content data) of the attribute of necessary file, namely not by these attributes write packaging file, thus improve compressing file rate further.
In order to realize above-mentioned and relevant object, will describe in detail and the feature particularly pointed out in the claims after one or more aspect of the present invention comprises.Explanation below and accompanying drawing describe some illustrative aspects of the present invention in detail.But what these aspects indicated is only some modes that can use in the various modes of principle of the present invention.In addition, the present invention is intended to comprise all these aspects and their equivalent.
Accompanying drawing explanation
By reference to the content below in conjunction with the description of the drawings and claims, and understand more comprehensively along with to of the present invention, other object of the present invention and result will be understood and easy to understand more.In the accompanying drawings:
Fig. 1 is the schematic flow sheet of the packaging method according to the embodiment of the present invention;
Fig. 2 is the detailed process schematic diagram of the packaging method according to the embodiment of the present invention;
Fig. 3 is the logical organization schematic diagram of the packing apparatus according to the embodiment of the present invention;
Fig. 4 is the logical organization schematic diagram of the packing apparatus of an embodiment according to the embodiment of the present invention.
Label identical in all of the figs indicates similar or corresponding feature or function.
Embodiment
In the following description, for purposes of illustration, in order to provide the complete understanding to one or more embodiment, many details have been set forth.But, clearly, also these embodiments can be realized when there is no these details.In other example, one or more embodiment for convenience of description, known structure and equipment illustrate in block form an.
The invention provides a kind of packaging method and device, the problem that existing packing compress mode compressibility is not high can be solved.
Conveniently understand the present invention, first several concept of the present invention made explanations:
Packing compression parameters: comprise directory name (namely which catalogue being packed), compression level (0-9, the larger compressibility of numeral is higher, and in order to improve compressibility, the compression level of the present invention's acquiescence is 9).
Target directory: that selectes for user will carry out the catalogue compressed of packing.
Packaging file: the file produced by gzip distributing operation system interface, gzip compresses packing data and writes this file.The present invention formulates the form of packaging file, and the compression interface that calling gzip provides writes packing data toward this file.The present invention adopts the mode of traversal limit, limit packing compression to process file.
Ordinary file: be a kind of file type defined in file system is exactly file the most frequently used in system, as text, binary file etc.
Other file: mainly refer to device file, chained file and FIFO, socket file.
Device file: mainly refer to for peripheral equipment provides the file of simple interface, as the various files under disk partition under printer interface file or Linux file system, Linux file system/dev catalogue, device file also may have access to the specific resources in some computer systems, as hard disk.
Chained file: the desktop shortcuts in such as Windows, OSX system.
FIFO, socket file: these files can be used for communicating or network service between implementation process, but these files are not used in preservation content usually.
The attribute of file: comprise the information such as file access authority, owner information, group information, last modification time.
Below with reference to accompanying drawing, specific embodiments of the invention are described in detail.
Because existing packing compression method is as zip, tar, capital is by ordinary file, and the file of part other types outside ordinary file writes packaging file together with the attribute of these files, and under some use scenes (application scenarios as described in the technology of the present invention background), the file of some types and the attribute of file are non-essential.Usually these attributes can be obtained by calling system function lstat.The packaging method that the embodiment of the present invention provides leaves necessary file by giving up non-essential file, and when necessary file write packaging file is carried out packing compression, not by the attribute of necessary file write packaging file, the compressibility of file can be improved with this, realize better packing effect.
It should be noted that, necessary file just refers to above-mentioned ordinary file.
Fig. 1 shows the flow process that can improve the packaging method of compressibility according to the embodiment of the present invention.
As shown in Figure 1, the packaging method of raising compressibility that the embodiment of the present invention provides comprises step:
S101, according to packing compression parameters traversal target directory;
S102, in ergodic process, judge file under described target directory or described target directory sub-directory under file when being ordinary file, obtain the data of the file under the data of the file under described target directory and the sub-directory of described target directory;
S103, the data write packaging file of the data of file under the described target directory obtained and file under the sub-directory of described target directory to be compressed.
Wherein, during described data write packaging file by the data of file under the described target directory that obtains and file under the sub-directory of described target directory, the attribute information of file is given up.
Wherein, it is the attribute that calling system function obtains file in described ergodic process, after the attribute padding data structure of described file, value according to the flag of described data structure conforms to a predetermined condition, and judges that the file under the sub-directory of file under described target directory or described target directory is ordinary file.
The method also comprises: when judging to be the sub-directory of described target directory in ergodic process, obtain the data of the sub-directory of described target directory, is compressed by the data of the sub-directory of the described target directory obtained write packaging file; Wherein, the data of described sub-directory comprise the path content data of described sub-directory and the path of described sub-directory, do not comprise the file under sub-directory.
Can find, utilize above-mentioned according to file packing method provided by the invention and device, by the type of the file under the sub-directory that first judges file under described target directory or described target directory in ergodic process, judge be after ordinary file using ordinary file as necessary file, non-generic file is then inessential file, gives up inessential file, is only carried out packing and compressing by necessary file write packaging file, compressing file rate can be improved, solve prior art Problems existing.Further, after judging that ordinary file is as necessary file, give up the data (i.e. non-file content data) of the attribute of necessary file, namely not by these attributes write packaging file, thus improve compressing file rate further.
In order to illustrate in greater detail the packaging method of the raising compressibility that the embodiment of the present invention provides, Fig. 2 shows the detailed process of the packaging method of the raising compressibility according to the embodiment of the present invention.
As shown in Figure 2, the packaging method of the raising compressibility that the embodiment of the present invention provides, comprises the following steps:
Step S201: according to packing compression parameters traversal target directory.
Wherein, compression parameters is that user sets, and the object of setting compression parameters is that the selected catalogue of user is as target directory, and using the home directory of target directory as traversal.
Step S202: traversal target directory.
The embodiment of the present invention uses depth-first search mode to travel through target directory, and depth-first search mode adopts recursive algorithm, such as, A is had under target directory, C two sub-directories, the sequence of A catalogue is more forward than C catalogue, the traversal order of the mode of depth-first search is so used to be, after first having traveled through the file under A catalogue, again using A catalogue as root directory, sub-directory under traversal A catalogue, continue with the file under sub-directory under depth-first traversal A catalogue again, until elements all under having traveled through A catalogue, then start to travel through the element under C catalogue, the mode of same employing depth-first search travels through the element under C catalogue.
The object of traversal target directory is to read the sub-directory in target directory and file, for follow-up packing compression work is prepared.
Step S203: the attribute being obtained file by calling system function lstat, the content read by determined property traversal is sub-directory or file, if be sub-directory, then enters step S204; If be file, then enter step S205.
It should be noted that, directly can judge that belonging to sub-directory still belongs to file according to the attribute of file, and the attribute of file can be obtained by calling system function, such as calling system function lstat.
Not only it should be noted that, the content under target directory only has two kinds, and one is sub-directory, and another kind is the file under target directory, and also may include file under sub-directory, so above-mentioned file comprises the file under target directory but also the file under comprising sub-directory.
Step S204: the path content data reading sub-directory, calculate the path of this sub-directory, the path of this sub-directory calculated and the path content data of the sub-directory read out are write packaging file, then using this sub-directory as target directory, circulation step S202-step S203.
Integer 32768 can be represented because 15 bit are maximum, namely maximumly can preserve integer 32768, and path maximum under (SuSE) Linux OS is 4096 bytes, be equivalent to integer 4096, therefore, the path of the embodiment of the present invention takies 15 bit, enough ensures the path under (SuSE) Linux OS.
In order to one_to_one corresponding catalogue and file when decompressing, needing to mark catalogue and file when packing compression, with a bit, the embodiment of the present invention is represented that path is sub-directory or file, if path is sub-directory, bit is set to 1, if path is file, bit is set to 0.
Therefore, embodiment of the present invention path takies disk space two bytes, totally 16 bit, and it is sub-directory or file that first bit is used for path label, and 15 bit are below used for store path length.
The path content data of acquisition approach will obtain path, such as: the path content data of acquisition is abcd, this path is made up of " a, b, c, d " 4 ascii characters, namely be made up of 4 bytes, so the path in this path is 4, namely " it is integer " 4 " that path accounts for the content of preserving in 15 bit spaces, if this path is a catalogue, so the 1st bit is set to 1; If this path is a file, then first bit is set to 0.
Space shared by path content data is change, the length of concrete change is determined such as by the value of the path taking 15bit above: a path is made up of 100 characters, so this path will occupy 100 bytes, it is integer " 100 " that path accounts for the content of preserving in 15 bit spaces, another path is made up of 20 characters, so this path will occupy 20 bytes, and it is integer " 20 " that path accounts for the content of preserving in 15 bit spaces.
What path was followed below is path content data length, and path content data length is the length of the content under path, the actual length taking disk space of the content namely under path.
Step S205: judge whether file is ordinary file, if be ordinary file, then enters step S206; If be not ordinary file, then give up this file.
The deterministic process of this step: calling system function obtains the attribute of file, after the attribute padding data structure of described file, value according to the flag of described data structure conforms to a predetermined condition, and judges that the file under the sub-directory of file under described target directory or described target directory is ordinary file.Concrete:
Calling system function lstat, import current file path into, function inserts stat structure the attribute information returned, the present invention is by judging whether the position of S_IFREG in stat.st_mode is 1 (i.e. (stat.st_mode & S_IFREG) >0), if so, then represent that current file is ordinary file.It should be noted that, being be 1 to illustrate with value here, also can be that other value correspondences of setting judge it is ordinary file.
It is ordinary file that this step travels through according to the determined property of file the file obtained, if traveling through the file obtained is not ordinary file, classified as other file, in order to improve compressibility under Hybrid framework use scenes, the embodiment of the present invention gives up non-essential file, namely other file, gives up other file and means and do not process for other file, only retain ordinary file to compress, reach more ultimate attainment compressibility with this.
Step S206: interpretation go out be ordinary file after, read the path content data of file and the content of file, the path of calculation document and the content-length of file, the path content data of the path of the file calculated, the content-length of file, the file of reading, the content of file are write packaging file, and for the attribute information of file, as information such as file access authority, owner information, group information, last modification times, then do not write packaging file, the content that need compress can be reduced like this, improve compressibility further.
Wherein, the path computing method of file calculate identical with the path of above-mentioned sub-directory, therefore no longer repeat.
And the content-length of file 4 byte representations, namely disk 4 bytes are taken, maximumly represent integer 4294967295, namely the content-length of file accounts for the content of depositing in the space of 4 bytes is integer " 4294967295 ", and meaning that Single document content is maximum can support 4G.
Such as, running into a file content length in ergodic process is 100 bytes, so the content of these 4 bytes store is exactly integer " 100 ", integer " 100 " in fact just enough stores by 1 byte, but agreement must ensure self-consistentency here, so still use 4 bytes to preserve this length, if a file content just has 4G size, so these 4 bytes also enough store 4G, i.e. " 4294967295 " this integer.
The content-length of file is change, and the length of concrete change determined by the value of the file content length of 4 bytes above, such as:
If a/b/test.txt file contains only " XYZ " 3 characters, then the content-length of this file is 3, and so the content-length of file accounts for the content of depositing in the space of 4 bytes is integer " 3 "; Content immediately following the byte of 3 after file content length is " XYZ ", and namely the content of this file occupies 3 bytes.
If contains only " ABCDEFG " 7 characters in a/b/test.txt file, then the content-length of this file is 7, and so the content-length of file accounts for the content of depositing in the space of 4 bytes is integer " 7 "; Content immediately following the byte of 7 after file content length is " ABCDEFG ", and namely the content of this file occupies 7 bytes.
As can be seen from foregoing, in above-mentioned steps S204 and step S206, do not obtain the attribute of file, not by the attribute of file write packaging file, in some use scenes, as under Hybrid framework, installation kit does not need the attribute of these files, can reach more ultimate attainment compressibility by the attribute giving up file.
Step S207: when having traveled through all catalogues and file, packing compression process terminates, and obtains compressed file.
Due to employing is that traversal compresses the mode of simultaneously carrying out with packing, and therefore, after traversal terminates, packing compression process also can terminate, and obtains the file compressed.
Above-mentioned flow process describe in detail the packaging method of the raising compressibility that the embodiment of the present invention provides, by giving up non-essential file, ordinary file is write packaging file to carry out packing and compressing, to improve compressing file rate, further, also give up the attribute of ordinary file during packing, attribute does not write packaging file to carry out packing and compressing, and can improve compressing file rate further.
Corresponding with said system, the present invention also provides a kind of packing apparatus improving compressibility.Fig. 3 shows the logical organization of the packing apparatus of the raising compressibility according to the embodiment of the present invention.
As shown in Figure 3, the packing apparatus of the raising compressibility that the embodiment of the present invention provides, comprises target directory Traversal Unit 310, file type judging unit 320, file data acquiring unit 330, packing compression unit 340, sub-directory data capture unit 350.
Target directory Traversal Unit 310, for traveling through target directory according to packing compression parameters;
File type judging unit 320, in ergodic process, judge file under described target directory or described target directory sub-directory under file whether be ordinary file;
File data acquiring unit 330, for when described file type unit 320 is judged to be ordinary file, obtains the data of the file under the data of the file under described target directory and the sub-directory of described target directory;
Packing compression unit 340, for writing packaging file by the data of the file under the sub-directory of the data of the file under described target directory and described target directory and compressing.
Wherein, the data of the file under described target directory comprise the path of the content of file, the content-length of file, the path content data of file and file; The data of the file under described sub-directory comprise the path of the content of file, the content-length of file, the path content data of file and file.
Wherein, during the data write packaging file of described packing compression unit 340 by the data of file under the described target directory that obtains and file under the sub-directory of described target directory, the attribute information of file is given up.
Sub-directory data capture unit 350, during for judging to be the sub-directory of described target directory in described target directory Traversal Unit 310 ergodic process, obtain the data of the sub-directory of described target directory, wherein, the data of described sub-directory comprise the path content data of described sub-directory and the path of described sub-directory, do not comprise the file under sub-directory;
The data of the sub-directory of the described target directory obtained are write packaging file and compress by described packing compression unit 340.
Described file type judging unit 320 is attributes that calling system function obtains file in described ergodic process, after the attribute padding data structure of described file, value according to the flag of described data structure conforms to a predetermined condition, and judges that the file under the sub-directory of file under described target directory or described target directory is ordinary file.
Fig. 4 shows the logical organization of the packing apparatus of the raising compressibility of an embodiment according to the embodiment of the present invention.
As shown in Figure 4, in an embodiment of the embodiment of the present invention, sub-directory data capture unit 350 comprises: sub-directory path acquisition module 351, for obtaining the path of sub-directory; Sub-directory path acquisition module 352, for obtaining the path of sub-directory; And
File data acquiring unit 330 comprises: file content acquisition module 331, for obtaining the content of the file under the content of the file under target directory and sub-directory; File path content obtaining module 332, for obtaining the path content data of the file under the path content data of the file under target directory and sub-directory; File path length acquisition module 333, for obtaining the path of the file under the path of the file under target directory and sub-directory; File content length acquisition module 334, for obtaining the content-length of the file under the content-length of the file under target directory and sub-directory.
Be that calling system function obtains the attribute of file in described target directory Traversal Unit 310 ergodic process, go out according to determined property the sub-directory that content that traversal reads is file under described target directory or described target directory.
The interactive relation of above-mentioned each unit module, specifically see the description of previous methods, can repeat no more herein.
Packaging method and the device of the raising compressibility proposed according to the present invention is described in an illustrative manner above with reference to accompanying drawing.But, it will be appreciated by those skilled in the art that system for prompting and the method for the terminal device position that the invention described above is proposed, on the basis not departing from content of the present invention, various improvement can also be made to the details that realizes wherein.Therefore, protection scope of the present invention should be determined by the content of appending claims.

Claims (10)

1. a file packing method, comprising:
According to packing compression parameters traversal target directory;
When the file judging under the sub-directory of file under described target directory or described target directory in ergodic process is ordinary file, obtain the data of the file under the data of the file under described target directory and the sub-directory of described target directory;
The data of the data of file under the described target directory obtained and the file under the sub-directory of described target directory are write packaging file and compress.
2. file packing method as claimed in claim 1, wherein, during described data write packaging file by the data of file under the described target directory that obtains and the file under the sub-directory of described target directory, gives up the attribute information of file.
3. file packing method as claimed in claim 1, also comprise: when judging to be the sub-directory of described target directory in ergodic process, obtain the data of the sub-directory of described target directory, the data of the sub-directory of the described target directory obtained are write packaging file and compresses; Wherein, the data of described sub-directory comprise the path content data of described sub-directory and the path of described sub-directory, do not comprise the file under sub-directory.
4. file packing method as claimed in claim 2, wherein,
The data of the file under described target directory comprise the path of the content of file, the content-length of file, the path content data of file and file;
The data of the file under described sub-directory comprise the path of the content of file, the content-length of file, the path content data of file and file.
5. file packing method as claimed in claim 1, wherein,
It is the attribute that calling system function obtains file in described ergodic process, after the attribute padding data structure of described file, value according to the flag of described data structure conforms to a predetermined condition, and judges that the file under the sub-directory of file under described target directory or described target directory is ordinary file.
6. the file packing method as described in claim 1 or 3, wherein,
Be that calling system function obtains the attribute of file in described ergodic process, go out according to determined property the sub-directory that content that traversal reads is file under described target directory or described target directory.
7. a file packing apparatus, comprising:
Target directory Traversal Unit, for traveling through target directory according to packing compression parameters;
File type judging unit, in ergodic process, judge file under described target directory or described target directory sub-directory under file whether be ordinary file;
File data acquiring unit, when being ordinary file for going out in described file type unit judges, obtains the data of the file under the data of the file under described target directory and the sub-directory of described target directory;
Packing compression unit, for writing packaging file by the data of the file under described target directory with the data of the file under the sub-directory of described target directory and compress.
8. file packing apparatus as claimed in claim 7, wherein, during the data write packaging file of described packing compression unit by the data of file under the described target directory that obtains and the file under the sub-directory of described target directory, gives up the attribute information of file.
9. file packing apparatus as claimed in claim 7, also comprises:
Sub-directory data capture unit, during for judging to be the sub-directory of described target directory in described target directory Traversal Unit ergodic process, obtain the data of the sub-directory of described target directory, wherein, the data of described sub-directory comprise the path content data of described sub-directory and the path of described sub-directory, do not comprise the file under sub-directory;
The data of the sub-directory of the described target directory obtained are write packaging file and compress by described packing compression unit.
10. file packing apparatus as described in claim 7, wherein,
Described file type judging unit is the attribute that calling system function obtains file in described ergodic process, after the attribute padding data structure of described file, value according to the flag of described data structure conforms to a predetermined condition, and judges that the file under the sub-directory of file under described target directory or described target directory is ordinary file.
CN201410283913.9A 2014-06-23 2014-06-23 A kind of file packing method and device Active CN105446975B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410283913.9A CN105446975B (en) 2014-06-23 2014-06-23 A kind of file packing method and device
PCT/CN2014/088278 WO2015196621A1 (en) 2014-06-23 2014-10-10 File packing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410283913.9A CN105446975B (en) 2014-06-23 2014-06-23 A kind of file packing method and device

Publications (2)

Publication Number Publication Date
CN105446975A true CN105446975A (en) 2016-03-30
CN105446975B CN105446975B (en) 2019-03-15

Family

ID=54936586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410283913.9A Active CN105446975B (en) 2014-06-23 2014-06-23 A kind of file packing method and device

Country Status (2)

Country Link
CN (1) CN105446975B (en)
WO (1) WO2015196621A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161633A (en) * 2016-07-20 2016-11-23 柏科数据技术(深圳)股份有限公司 A kind of based on the transmission method of packaging file under cloud computing environment and system
CN107402788A (en) * 2017-07-25 2017-11-28 网易(杭州)网络有限公司 Resource packing management method and device
CN107609072A (en) * 2017-09-01 2018-01-19 联想(北京)有限公司 A kind of data processing method and device
CN107734022A (en) * 2017-09-30 2018-02-23 努比亚技术有限公司 Static resource document down loading method, mobile terminal and computer-readable recording medium
CN109828955A (en) * 2019-01-10 2019-05-31 浙江数链科技有限公司 Document processing method, device, computer equipment and storage medium
CN111538706A (en) * 2020-04-21 2020-08-14 惠州Tcl移动通信有限公司 Data compression method and device, storage medium and mobile terminal
CN116069729A (en) * 2023-04-06 2023-05-05 深圳市微克科技有限公司 Intelligent document packaging method, system and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110989978A (en) * 2019-11-06 2020-04-10 北京达佳互联信息技术有限公司 Page packaging method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073633A (en) * 2009-11-23 2011-05-25 腾讯科技(深圳)有限公司 Method and device for storing and accessing resource file
US20120158677A1 (en) * 2010-12-20 2012-06-21 Apple Inc. Systems and methods for streaming compressed files via a non-volatile memory
CN102761540A (en) * 2012-05-30 2012-10-31 北京奇虎科技有限公司 Data compression method, device and system and server
CN102881036A (en) * 2012-07-30 2013-01-16 北京中科盘古科技发展有限公司 Method for compressing animation scene files

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1151436C (en) * 2000-07-31 2004-05-26 岱升科技股份有限公司 Method of loading operation system and application program into memory
CN1169118C (en) * 2001-07-04 2004-09-29 英业达集团(南京)电子技术有限公司 Speech playing method for electronic device
KR100613076B1 (en) * 2004-12-14 2006-08-16 주식회사 팬택앤큐리텔 Method For Image File Management In The Mobile Communication Terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073633A (en) * 2009-11-23 2011-05-25 腾讯科技(深圳)有限公司 Method and device for storing and accessing resource file
US20120158677A1 (en) * 2010-12-20 2012-06-21 Apple Inc. Systems and methods for streaming compressed files via a non-volatile memory
CN102761540A (en) * 2012-05-30 2012-10-31 北京奇虎科技有限公司 Data compression method, device and system and server
CN102881036A (en) * 2012-07-30 2013-01-16 北京中科盘古科技发展有限公司 Method for compressing animation scene files

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161633A (en) * 2016-07-20 2016-11-23 柏科数据技术(深圳)股份有限公司 A kind of based on the transmission method of packaging file under cloud computing environment and system
CN107402788A (en) * 2017-07-25 2017-11-28 网易(杭州)网络有限公司 Resource packing management method and device
CN107402788B (en) * 2017-07-25 2020-09-25 网易(杭州)网络有限公司 Resource packaging management method and device
CN107609072A (en) * 2017-09-01 2018-01-19 联想(北京)有限公司 A kind of data processing method and device
CN107609072B (en) * 2017-09-01 2020-11-20 联想(北京)有限公司 Data processing method and device
CN107734022A (en) * 2017-09-30 2018-02-23 努比亚技术有限公司 Static resource document down loading method, mobile terminal and computer-readable recording medium
CN107734022B (en) * 2017-09-30 2021-08-10 努比亚技术有限公司 Static resource file downloading method, mobile terminal and computer readable storage medium
CN109828955A (en) * 2019-01-10 2019-05-31 浙江数链科技有限公司 Document processing method, device, computer equipment and storage medium
CN111538706A (en) * 2020-04-21 2020-08-14 惠州Tcl移动通信有限公司 Data compression method and device, storage medium and mobile terminal
CN111538706B (en) * 2020-04-21 2023-11-14 惠州Tcl移动通信有限公司 Data compression method, device, storage medium and mobile terminal
CN116069729A (en) * 2023-04-06 2023-05-05 深圳市微克科技有限公司 Intelligent document packaging method, system and medium

Also Published As

Publication number Publication date
WO2015196621A1 (en) 2015-12-30
CN105446975B (en) 2019-03-15

Similar Documents

Publication Publication Date Title
CN105446975A (en) File packing method and device
CN108845816B (en) Application program updating method, system, computer device and storage medium
CN102684827B (en) Data processing method and data processing equipment
US8924366B2 (en) Data storage deduplication systems and methods
CN103942058B (en) A kind of EMBEDDED AVIONICS method for upgrading software and system
CN107526743B (en) Method and apparatus for compressing file system metadata
US11221992B2 (en) Storing data files in a file system
CN105867947A (en) Data processing method and device after upgrades of preset applications
CN104461505B (en) A kind of terminal
EP2863593A1 (en) A method, apparatus and computer program for modifying messages in a communications network
US20160352811A1 (en) Streaming zip
CN105975311A (en) Application startup method and device
CN104899049A (en) File deletion method and device
US20140164574A1 (en) Method and System for Downloading a Font File
CN103823807A (en) Data de-duplication method, device and system
CN106325896A (en) Method and device for processing shared function library file of installation package
CN105740298A (en) File processing method and apparatus, and server-side equipment
US10803018B2 (en) Compressed data rearrangement to optimize file compression
CN106506178A (en) A kind of method and system for for the accurate drainage of main broadcaster
CN111414339B (en) File processing method, system, device, equipment and medium
CN104063377A (en) Information processing method and electronic equipment using same
CN106897052A (en) APK file compression method and device
KR102141749B1 (en) APP program execution method and device
CN109617708B (en) Compression method, device and system for embedded point log
CN104516764B (en) Compressed file dynamic packaging method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200526

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: Two, room 902, West 64, 66 Middle Road, Tianhe District, Guangdong, Guangzhou, China 510665

Patentee before: GUANGZHOU UCWEB COMPUTER TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right