CN108563646A - A kind of file independent compression processing method and system - Google Patents

A kind of file independent compression processing method and system Download PDF

Info

Publication number
CN108563646A
CN108563646A CN201710731485.5A CN201710731485A CN108563646A CN 108563646 A CN108563646 A CN 108563646A CN 201710731485 A CN201710731485 A CN 201710731485A CN 108563646 A CN108563646 A CN 108563646A
Authority
CN
China
Prior art keywords
compressed
file
compression
unit
information
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.)
Withdrawn
Application number
CN201710731485.5A
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.)
Hefei Dragon Totem Information Technology Co Ltd
Original Assignee
Hefei Dragon Totem 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 Hefei Dragon Totem Information Technology Co Ltd filed Critical Hefei Dragon Totem Information Technology Co Ltd
Priority to CN201710731485.5A priority Critical patent/CN108563646A/en
Publication of CN108563646A publication Critical patent/CN108563646A/en
Withdrawn legal-status Critical Current

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

Landscapes

  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of file independent compression processing methods and system, this method to include:The original document for needing to compress is obtained, the original document is the subfile under multiple independent files or file;All original documents of acquisition are uniformly processed, and by choosing a kind of compression algorithm in at least one preset compression algorithm of selection unit seed selection;Current all original documents are compressed to specified temporary position, read each subfile in temporary position, and send verification unit to;To being read out for all original documents of acquisition, read the original document of seed selection, the filename for including in original document is checked with the filename for including in subfile list to be compressed, if do not omitted, described the step of being compressed to obtain current compression packet to each subfile to be compressed is executed;It ensure that all original document independent compressions and filename do not change, be pressed in without solution and complete, to compressing the edit operation of package-in file, to save the time.

Description

A kind of file independent compression processing method and system
Technical field
The present invention relates to technical field of information processing, specifically a kind of file independent compression processing method and system.
Background technology
Current compressing file is to be compressed in multiple Piece file mergences " Desktop " jointly when to multiple compressing files Under compressed package, compressing file packet name changing needs the title of manual editing's compressed package to increase the triviality of compression.For " Desktop " compressed package, when needing to send, user needs manual modification " Desktop " compressed package title, is brought not to user Just.Therefore, it is necessary to a kind of file independent compression processing method and systems, when to multiple compressing files, can be chosen multiple File independent compression do not change at the one-to-one compressed package of title and the title corresponding to each independent compression packet and file, The corresponding compressed package of each document can be obtained when user's batch seed selection document compresses, and document corresponds to title and do not change Become, it is convenient that each independent document compressed package seed selection is sent without being compressed under one " Desktop ", meet making for user Use demand.
Invention content
The purpose of the present invention is to provide a kind of file independent compression processing method and systems, to solve above-mentioned background technology The problem of middle proposition.
To achieve the above object, the present invention provides the following technical solutions:
A kind of file independent compression processing method, this method include:
S1:The original document for needing to compress is obtained, the original document is the Ziwen under multiple independent files or file Part;
S2:All original documents of acquisition are uniformly processed, and are calculated by at least one preset compression of selection unit seed selection A kind of compression algorithm is chosen in method;
S3:Current all original documents are compressed to specified temporary position, read each subfile in temporary position, and Send verification unit to;
S4:To being read out for all original documents of acquisition, the original document of seed selection is read, will include in original document Filename checked with the filename for including in subfile list to be compressed, if do not omitted, execute described to each Subfile to be compressed is compressed the step of obtaining current compression packet;
S5:Top of file name information is read from all original documents, respectively waits pressing to what is recorded in the name information of head Contracting file is judged one by one with subfile attribute to be compressed, if content is consistent, is entered compressed package and is made;If content It is inconsistent, then send modification unit to;
S6:It modifies to each file to be compressed and the header information of subfile to be compressed, changes and sent out in header information The information for changing is retained as no changed information, described to modify including the road to each subfile to be compressed Diameter information is modified, and modified head is believed to the header information of current compression packet, sends compression unit to;
S7:According to the header information of the current compression packet received, to each file to be compressed and subfile to be compressed point It is not compressed, compressed each file to be compressed and subfile to be compressed is stored into corresponding document;
S8:The filename for including in each listed files after the filename for including in original document and compression is subjected to core one by one To comparing, if filename is consistent, completion is compressed, storage unit is transmitted to compressed package;If filename is inconsistent, compress Failure sends each listed files after compression to modification unit, repeats S6 steps;
S9:By in the compressed compressed file storage to each compressed package of compression unit, current compression packet is obtained.
As a further solution of the present invention, further include:
The S10:It contracts into current compression packet in the original document combined pressure of secondary seed selection.
As a further solution of the present invention, further include:
S11:Edit-modify is carried out to the file in the current compression packet;
S12:File carries out Information Compression processing after the editor obtained to the edit cell;
S13:According to the Information Compression handling result of the processing unit, to file after being edited described in Information Compression file Original information content is updated;
S14:Using the compressed package of unmodified file in the current compression packet and by being obtained to the edit cell The modification after file carry out the obtained compressed package of compression processing, generate updated installation kit.
As a further solution of the present invention:Described obtain needs the original document that compresses to include:
Obtain the filename of each file;
Identify the content format and size of each file.
As a further solution of the present invention:The file format of the original document is txt formats, doc formats, wps lattice It is one or more in formula, jpg formats, gif formats, PNG format, swf formats, wav formats, zip formats or xls formats.
A kind of file independent compression processing system, including:
The acquiring unit, the original document for needing to compress;
The selection unit, for choosing a kind of compression algorithm from least one preset compression algorithm;
The reading unit sends verification unit to for the reading head information from each original document;
The verification unit, the text for including from the filename for including in original document and subfile list to be compressed Part name is checked, and sends modification unit to;
The modification unit is modified for each file to be compressed and the header information of subfile to be compressed, is changed Changed information in header information is retained as no changed information, described to modify including to respectively waiting pressing The routing information of contracting subfile is modified, and modified head is believed to the header information of current compression packet, and it is single to send compression to Member;
The compression unit, for being compressed respectively with subfile to be compressed to each file to be compressed, after compression Each file to be compressed with subfile to be compressed storage in corresponding document;
The storage unit, for by the compressed compressed file storage to each compressed package of compression unit, obtaining current Compressed package.
As a further solution of the present invention:Further include:
The combining unit, for the original document to secondary seed selection by being merged into current pressure after the compression singly compression In contracting packet;
The edit cell, for carrying out edit-modify to the file in the current compression packet;
The processing unit, file carries out Information Compression processing after the editor for being obtained to the edit cell;
The updating unit, for the Information Compression handling result according to the processing unit, in Information Compression file The original information content of file is updated after the editor;
The generation unit is used for using the compressed package of unmodified file in the current compression packet and by described File carries out the compressed package that compression processing obtains after the modification that edit cell obtains, and generates updated installation kit.
Compared with prior art, the beneficial effects of the invention are as follows:
1, the present invention first obtains all original documents, and chooses a kind of pressure at least one preset compression algorithm Compression algorithm reads the temporary position of original document, reads each subfile in temporary position, and passes to verification unit to original The filename for including in file is checked with the filename for including in subfile list to be compressed, and guarantee is not omitted.
2, each file to be compressed for being recorded in the name information of head is judged one by one with subfile attribute to be compressed, If content is consistent, enters compressed package and make;Content is inconsistent, then sends modification unit to, facilitates in modification header information Changed information is retained as no changed information;Ensure by compressed each file to be compressed with wait pressing In the storage to corresponding document of contracting subfile, it ensure that all original document independent compressions and filename do not change.
3, in the compressed compressed file storage to each compressed package of compression unit, current compression packet is obtained, can also be passed through Combining unit is merged into after compressing the original document of secondary seed selection in current compression packet;And it can also be by edit cell to working as File in preceding compressed package carries out edit-modify, and edited file is raw after processing unit and updating unit processing update At updated installation kit, it is pressed in without solution and completes, to compressing the edit operation of package-in file, to save the time.Editor
Description of the drawings
Fig. 1 is file independent compression process schematic in the present invention.
Fig. 2 is Piece file mergence compression process schematic diagram in the present invention.
Fig. 3 is Document Editing production process schematic diagram in the present invention.
Fig. 4 is file independent compression processing system schematic diagram in the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, in the embodiment of the present invention, a kind of file independent compression processing method, this method includes:
S1:The original document for needing to compress is obtained, the original document is the Ziwen under multiple independent files or file Part;
S2:All original documents of acquisition are uniformly processed, and are calculated by at least one preset compression of selection unit seed selection A kind of compression algorithm is chosen in method;
S3:Current all original documents are compressed to specified temporary position, read each subfile in temporary position, and Send verification unit to;
S4:To being read out for all original documents of acquisition, the original document of seed selection is read, will include in original document Filename checked with the filename for including in subfile list to be compressed, if do not omitted, execute described to each Subfile to be compressed is compressed the step of obtaining current compression packet.
S5:Top of file name information is read from all original documents, respectively waits pressing to what is recorded in the name information of head Contracting file is judged one by one with subfile attribute to be compressed, if content is consistent, is entered compressed package and is made;If content It is inconsistent, then send modification unit to;
S6:It modifies to each file to be compressed and the header information of subfile to be compressed, changes and sent out in header information The information for changing is retained as no changed information, described to modify including the road to each subfile to be compressed Diameter information is modified, and modified head is believed to the header information of current compression packet, sends compression unit to.
S7:According to the header information of the current compression packet received, to each file to be compressed and subfile to be compressed point It is not compressed, compressed each file to be compressed and subfile to be compressed is stored into corresponding document;
S8:The filename for including in each listed files after the filename for including in original document and compression is subjected to core one by one To comparing, if filename is consistent, completion is compressed, storage unit is transmitted to compressed package;If filename is inconsistent, compress Failure sends each listed files after compression to modification unit, repeats S6 steps;
S9:By in the compressed compressed file storage to each compressed package of compression unit, current compression packet is obtained.
Referring to Fig. 2, S10:It contracts into current compression packet in the original document combined pressure of secondary seed selection.
Referring to Fig. 3, S11:Edit-modify is carried out to the file in the current compression packet;
S12:File carries out Information Compression processing after the editor obtained to the edit cell;
S13:According to the Information Compression handling result of the processing unit, to file after being edited described in Information Compression file Original information content is updated;
S14:Using the compressed package of unmodified file in the current compression packet and by being obtained to the edit cell The modification after file carry out the obtained compressed package of compression processing, generate updated installation kit.
Described obtain needs the original document that compresses to include:
Obtain the filename of each file;
Identify the content format and size of each file.
The file format of the original document is txt formats, doc formats, wps formats, jpg formats, gif formats, PNG lattice It is one or more in formula, swf formats, wav formats, zip formats or xls formats.
Referring to Fig. 4, a kind of file independent compression processing system, including:
The acquiring unit, the original document for needing to compress;
The selection unit, for choosing a kind of compression algorithm from least one preset compression algorithm;
The reading unit sends verification unit to for the reading head information from each original document;
The verification unit, the text for including from the filename for including in original document and subfile list to be compressed Part name is checked, and sends modification unit to;
The modification unit is modified for each file to be compressed and the header information of subfile to be compressed, is changed Changed information in header information is retained as no changed information, described to modify including to respectively waiting pressing The routing information of contracting subfile is modified, and modified head is believed to the header information of current compression packet, and it is single to send compression to Member;
The compression unit, for being compressed respectively with subfile to be compressed to each file to be compressed, after compression Each file to be compressed with subfile to be compressed storage in corresponding document.
The storage unit, for by the compressed compressed file storage to each compressed package of compression unit, obtaining current Compressed package.
The combining unit, for the original document to secondary seed selection by being merged into current pressure after the compression singly compression In contracting packet;
The edit cell, for carrying out edit-modify to the file in the current compression packet;
The processing unit, file carries out Information Compression processing after the editor for being obtained to the edit cell;
The updating unit, for the Information Compression handling result according to the processing unit, in Information Compression file The original information content of file is updated after the editor;
The generation unit is used for using the compressed package of unmodified file in the current compression packet and by described File carries out the compressed package that compression processing obtains after the modification that edit cell obtains, and generates updated installation kit.
The invention is not limited in above-described embodiments, on the basis of technical solution disclosed by the invention, the skill of this field For art personnel according to disclosed technology contents, one can be made to some of which technical characteristic by not needing performing creative labour A little simple modification, equivalent change and modifications, belong in the range of technical solution of the present invention.
In the description of this specification, it should be noted that unless otherwise clearly defined and limited, term " setting ", " connected " and " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or integrally connect It connects;It can be directly connected, can also can be indirectly connected through an intermediary the connection inside two elements.For this For the those of ordinary skill in field, the concrete meaning of above-mentioned term in the present invention can be understood with concrete condition.

Claims (7)

1. a kind of file independent compression processing method, which is characterized in that this method includes:
S1:The original document for needing to compress is obtained, the original document is the subfile under multiple independent files or file;
S2:All original documents of acquisition are uniformly processed, and by at least one preset compression algorithm of selection unit seed selection Choose a kind of compression algorithm;
S3:Current all original documents are compressed to specified temporary position, read each subfile in temporary position, and transmit Give verification unit;
S4:To being read out for all original documents of acquisition, the original document of seed selection is read, the text that will include in original document Part name is checked with the filename for including in subfile list to be compressed, if do not omitted, is executed described to respectively waiting pressing Contracting subfile is compressed the step of obtaining current compression packet;
S5:Top of file name information is read from all original documents, to each text to be compressed recorded in the name information of head Part is judged one by one with subfile attribute to be compressed, if content is consistent, is entered compressed package and is made;If content differs It causes, then sends modification unit to;
S6:It modifies to each file to be compressed and the header information of subfile to be compressed, changes and become in header information The information of change is retained as no changed information, described to modify including the path letter to each subfile to be compressed Breath is modified, and modified head is believed to the header information of current compression packet, sends compression unit to;
S7:According to the header information of the current compression packet received, to each file to be compressed and subfile to be compressed respectively into Row compression, compressed each file to be compressed and subfile to be compressed are stored into corresponding document;
S8:The filename for including in each listed files after the filename for including in original document and compression is checked into ratio one by one Compared with if filename is consistent, compressing completion, storage unit be transmitted to compressed package;If filename is inconsistent, mistake is compressed It loses, sends each listed files after compression to modification unit, repeat S6 steps;
S9:By in the compressed compressed file storage to each compressed package of compression unit, current compression packet is obtained.
2. a kind of file independent compression processing method according to claim 1, which is characterized in that further include:
S10:It contracts into current compression packet in the original document combined pressure of secondary seed selection.
3. a kind of file independent compression processing method according to claim 1, which is characterized in that further include:
S11:Edit-modify is carried out to the file in the current compression packet;
S12:File carries out Information Compression processing after the editor obtained to the edit cell;
S13:It is original to file after being edited described in Information Compression file according to the Information Compression handling result of the processing unit The information content be updated;
S14:Compressed package using unmodified file in the current compression packet and the institute by being obtained to the edit cell File carries out the compressed package that compression processing obtains after stating modification, generates updated installation kit.
4. a kind of file independent compression processing method according to claim 1, which is characterized in that obtain the original for needing to compress Beginning file includes:
Obtain the filename of each file;
Identify the content format and size of each file.
5. a kind of file independent compression processing method according to claim 4, which is characterized in that the tray of original document Formula be txt formats, doc formats, wps formats, jpg formats, gif formats, PNG format, swf formats, wav formats, zip formats or It is one or more in xls formats.
6. a kind of file independent compression processing system according to claim 1, which is characterized in that including:
The acquiring unit, the original document for needing to compress;
The selection unit, for choosing a kind of compression algorithm from least one preset compression algorithm;
The reading unit sends verification unit to for the reading head information from each original document;
The verification unit, the filename for including from the filename for including in original document and subfile list to be compressed It is checked, sends modification unit to;
The modification unit is modified for each file to be compressed and the header information of subfile to be compressed, changes head Changed information in information is retained as no changed information, described to modify including to each son to be compressed The routing information of file is modified, and modified head is believed to the header information of current compression packet, sends compression unit to;
The compression unit will be compressed each for being compressed respectively with subfile to be compressed to each file to be compressed File to be compressed is stored with subfile to be compressed into corresponding document;
The storage unit, for by the compressed compressed file storage to each compressed package of compression unit, obtaining current compression Packet.
7. a kind of file independent compression processing system according to claim 6, which is characterized in that further include:
The combining unit, for the original document to secondary seed selection by being merged into current compression packet after the compression singly compression In;
The edit cell, for carrying out edit-modify to the file in the current compression packet;
The processing unit, file carries out Information Compression processing after the editor for being obtained to the edit cell;
The updating unit, for the Information Compression handling result according to the processing unit, described in Information Compression file The original information content of file is updated after editor;
The generation unit is used for using the compressed package of unmodified file in the current compression packet and by the editor File carries out the compressed package that compression processing obtains after the modification that unit obtains, and generates updated installation kit.
CN201710731485.5A 2017-08-23 2017-08-23 A kind of file independent compression processing method and system Withdrawn CN108563646A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710731485.5A CN108563646A (en) 2017-08-23 2017-08-23 A kind of file independent compression processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710731485.5A CN108563646A (en) 2017-08-23 2017-08-23 A kind of file independent compression processing method and system

Publications (1)

Publication Number Publication Date
CN108563646A true CN108563646A (en) 2018-09-21

Family

ID=63529268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710731485.5A Withdrawn CN108563646A (en) 2017-08-23 2017-08-23 A kind of file independent compression processing method and system

Country Status (1)

Country Link
CN (1) CN108563646A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198858A (en) * 2018-11-16 2020-05-26 珠海金山办公软件有限公司 File processing method and device, computer storage medium and terminal
CN111966639A (en) * 2020-08-27 2020-11-20 恒为科技(上海)股份有限公司 Generating and processing method and device for PCB production file
WO2023174040A1 (en) * 2022-03-17 2023-09-21 华为技术有限公司 Picture processing method and related device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198858A (en) * 2018-11-16 2020-05-26 珠海金山办公软件有限公司 File processing method and device, computer storage medium and terminal
CN111966639A (en) * 2020-08-27 2020-11-20 恒为科技(上海)股份有限公司 Generating and processing method and device for PCB production file
WO2023174040A1 (en) * 2022-03-17 2023-09-21 华为技术有限公司 Picture processing method and related device

Similar Documents

Publication Publication Date Title
CN108563646A (en) A kind of file independent compression processing method and system
CN108833058B (en) Dynamic data compression and decompression method in communication process of wide area measurement system
CN104904232A (en) Video editing device
CN108427697A (en) Assembled architecture data export method based on BIM and device
CN104021217B (en) System and method for extracting fragment file and deleted file of mobile phone
CN103152606B (en) Video file processing method and device, system
CN110838893B (en) Communication system based on Beidou system and communication method thereof
CN104966309A (en) Automatic compression system and processing method for image with transparency
CN109033523A (en) A kind of Assembly process specification generation System and method for based on three-dimensional CAD model
CN104216970B (en) A kind of synergistic data exchange method
CN114553852A (en) Rapid uploading method based on asynchronous industrial file server
CN1598811A (en) Data compresser,data decompresser and data managing system
CN101867559B (en) Method for compressing file in instant communication and network storage system
CN113630729B (en) Intelligent 5G message transmission system
CN107315752B (en) Data transfer method and system
CN103324623A (en) Mobile terminal and data batch operating method
CN111079385A (en) Method and device for converting scientific formula format
CN113111040B (en) File decompression method and device
CN107563060A (en) The fast automatic Gerberout of pcb board method and system are realized using Skill programs
CN113220635B (en) File archiving method, device, equipment and computer readable storage medium
CN113377726A (en) High-reliability distributed mass data transmission method and tool
CN102347772B (en) Compression processing method and equipment for base station files
CN112232032B (en) Automatic conversion method for content style of docx document
CN114666406B (en) Electric power Internet of things data compression method and device based on object model
CN105183877A (en) Method for reorganizing docx file fragmentation 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20180921

WW01 Invention patent application withdrawn after publication