Program file compression method, device and electronic device
By dynamically determining compression methods for instruction nodes based on their data lengths, the method addresses storage waste in fixed byte compression, enhancing storage and transmission efficiency.
Patent Information
- Application Number
- CN202111296092.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-11-03
AI Technical Summary
In the prior art, program files are stored in fixed bytes, resulting in waste of storage space and inefficiency.
According to the instruction node data length of the function in the program file, dynamically determine the compression method, and write the data of the instruction node to the compressed program file at the corresponding length.
It realizes saving data storage space and improves storage and transmission efficiency.
Smart Images

Figure CN114238250B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data compression, and in particular, to a method, apparatus, and electronic device for compressing program files. Background Art
[0002] With the continuous development of computer technology, the storage space occupied by program files in a computer is getting larger and larger, and the requirements for the storage performance of the system are getting higher and higher.
[0003] In related technologies, program files are usually stored in a database; specifically, the program files are stored in the database in a compression manner with a set fixed number of bytes. However, when the actual number of bytes occupied by the data in the program file is less than the fixed number of bytes, it will cause waste of storage space, and at the same time, the storage efficiency and transmission efficiency of the program file will also be affected. Summary of the Invention
[0004] In view of the problems in related technologies, embodiments of the present invention provide a method, apparatus, and electronic device for compressing program files, which are used to solve the problem of waste of storage space caused by storing program files in a fixed-byte manner in related technologies.
[0005] Specifically, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a method for compressing a program file, the method including:
[0007] Obtaining at least one function in a target program file;
[0008] Determining a compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length used when compressing the data of the instruction node.
[0009] Based on the compression method, writing the data of the instruction node of the function into a compressed program file corresponding to the target program file, so as to compress the data of the instruction node of the function through the compressed program file.
[0010] Further, the determining a compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function includes:
[0011] Determining a compression method corresponding to the data of the instruction node according to a target compression relationship and the data length of the instruction node; wherein, the target compression relationship is used to represent the corresponding relationship between a numerical range and the compression method.
[0012] Further, the compression method includes: indication information, and the indication information is used to indicate corresponding compression methods by using different identifiers.
[0013] Further, determining the compression method corresponding to the data length of the instruction node according to the target compression relationship and the data length of the instruction node includes:
[0014] Determine the target numerical range corresponding to the data length of the instruction node according to the target compression relationship;
[0015] Determine the compression method corresponding to the data of the instruction node according to the target numerical range and the target compression relationship.
[0016] Further, the data of the instruction node includes: header information and instruction data content. Based on the compression method, writing the data of the instruction node of the function into the compressed program file corresponding to the target program file includes:
[0017] Write the header information of the instruction node and the data content of the instruction node into the compressed program file in sequence based on the data length indicated by the compression method.
[0018] Further, after writing the data of the instruction node of the function into the compressed program file corresponding to the target program file, the method further includes:
[0019] Determine whether there is still data of an instruction node to be compressed in the target program file;
[0020] If so, write the data of the instruction node to be compressed into the compressed program file based on the determined compression method until all the data of the instruction nodes in the target program file are processed.
[0021] In a second aspect, an embodiment of the present invention further provides a program file compression device, and the device includes:
[0022] An acquisition module, configured to acquire at least one function in a target program file;
[0023] A determination module, configured to determine the compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length adopted when compressing the data of the instruction node;
[0024] A compression module, configured to write the data of the instruction node of the function into the compressed program file corresponding to the target program file based on the compression method, so as to compress the data of the instruction node of the function through the compressed program file.
[0025] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the program file compression method described in the first aspect are implemented.
[0026] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the program file compression method described in the first aspect are implemented.
[0027] In a fifth aspect, an embodiment of the present invention further provides a computer program product, on which executable instructions are stored. When the instructions are executed by a processor, the processor is caused to implement the steps of the program file compression method described in the first aspect.
[0028] The program file compression method provided by the embodiment of the present invention dynamically determines the compression method corresponding to the data of the instruction node according to the data length of the instruction node of the target program file, and writes the data of the instruction node into the corresponding compressed program file of the target program file by using the data length indicated by the compression method, so as to compress the data of the instruction node, thereby saving the storage space of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0030] Figure 1 One of the flowcharts of the program file compression method provided by the present invention;
[0031] Figure 2 Another flowchart of the program file compression method provided by the present invention;
[0032] Figure 3 A schematic diagram for determining the compression method of the instruction node provided by the present invention;
[0033] Figure 4 Another flowchart of the program file compression method provided by the present invention;
[0034] Figure 5 A schematic diagram for data storage in the compressed program file provided by the present invention;
[0035] Figure 6 A schematic diagram of the structure of the program file compression device provided by the present invention;
[0036] Figure 7 Schematic structural diagram of the electronic device provided by the present invention. Specific embodiments
[0037] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0038] Figure 1 One of the flow diagrams of the program file compression method provided by the present invention, as Figure 1 shown, the method includes:
[0039] Step 110, obtaining at least one function in the target program file.
[0040] It should be noted that the program file compression method provided by the present invention can be applied to database compression scenarios of operating systems such as the class (linux) operating system. For example, the execution subject of the program file compression method provided by the present invention can be a program file compression device, such as a desktop computer or a server, or a control module in the program file compression device for executing the program file compression method.
[0041] Optionally, there are multiple target program files in the operating system; the target program file includes at least one function. The operating system loads the target program file into the memory buffer of the operating system by executing the target program file, so as to obtain at least one function in the target program file.
[0042] Step 120, determining the compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length adopted when compressing the data of the instruction node.
[0043] Optionally, the data length of the instruction node refers to the length corresponding to converting the data of the instruction node from decimal to binary. The compression method includes: indication information; wherein, the indication information is used to indicate the corresponding compression method by using different identifiers.
[0044] Step 130, based on the compression method, writing the data of the instruction node of the function into the corresponding compressed program file of the target program file, so as to compress the data of the instruction node of the function through the compressed program file.
[0045] It should be noted that there are multiple instruction nodes in the function, and the data of each instruction node includes the header information of the instruction node and the instruction data content; among them, the header information of the instruction node includes information such as the name and size of the instruction node. The types of instruction nodes include at least one of the following: address pair node, return instruction node, indirect jump node, sub-function call jump node.
[0046] Optionally, the method of writing the data of the instruction nodes of the function into the corresponding compressed program file of the target program file can be: according to the determined data compression method of the instruction nodes, write the data of each function and the instruction nodes of the function in the target program file into the corresponding compressed program file of the target program file in sequence.
[0047] The program file compression method provided by the present invention dynamically determines the compression method corresponding to the data of the instruction nodes according to the data length of the instruction nodes of the function in the target program file, and writes the data of the instruction nodes into the corresponding compressed program file of the target program file by using the data length indicated by the compression method, so as to compress the data of the instruction nodes, thereby saving the storage space of the data.
[0048] Figure 2 This is the second flow chart of the program file compression method provided by the present invention. As Figure 2 shown, the method includes:
[0049] Step 210, obtain at least one function in the target program file.
[0050] Step 220, determine the compression method corresponding to the data of the instruction node according to the target compression relationship and the data length of the instruction node; wherein, the target compression relationship is used to represent the corresponding relationship between the numerical range and the compression method.
[0051] Optionally, according to the numerical range corresponding to the data length of the instruction node, determine the compression method corresponding to this numerical range in the target compression relationship.
[0052] Optionally, the data of the instruction node is a single number or an array; among them, the data of the return instruction node and the indirect jump node is a single number, such as
[128] , while the data of the address pair node is an array, such as [[1001, 10], [1002, 10]]; where 1001 represents the starting address of the address pair node, 1002 represents the target address of the address pair node, and 10 represents the number of the target program file.
[0053] Optionally, the compression method corresponding to the data of the instruction node represents the storage size of the data of the instruction node, such as 1 byte, 2 bytes, 4 bytes, or 8 bytes; among them, 1 byte is 8 bit. Therefore, the storage range of the data corresponding to 1 byte is 0 to 64, the storage range of the data corresponding to 2 bytes is 0 to 16384, the storage range of the data corresponding to 4 bytes is 0 to 1073741824, and the storage range of the data corresponding to 8 bytes is 0 to 4.6116860184274e+18.
[0054] Step 230, based on the compression method, write the data of the instruction node into the compressed program file corresponding to the target program file, so as to compress the data of the instruction node of the function through the compressed program file.
[0055] Optionally, for the description and explanation of step 230, reference may be made to the description and explanation of step 130 above, and the same technical effects can be achieved. To avoid repetition, it will not be elaborated here.
[0056] The program file compression method provided by the present invention dynamically determines the compression method corresponding to the data of the instruction node according to the compression target relationship and the data length of the instruction node of the function in the target program file, and writes the data of the instruction node into the compressed program file corresponding to the target program file by using the data length indicated by the compression method, so as to compress the data of the instruction node, thereby saving the storage space of the data.
[0057] Optionally, the implementation manner of step 220 includes: determining the target numerical range corresponding to the data length of the instruction node in the target compression relationship according to the target compression relationship, and then determining the indication information corresponding to the data of the instruction node according to the determined target numerical range and the target compression relationship, so as to determine the compression method corresponding to the data of the instruction node.
[0058] It should be noted that the first two digits of the compression method represent indication information, which is used to indicate the corresponding compression method with different identifiers. For example, when the indication information of the compression method is 00, this indication information means that the compression method corresponds to storing 1 byte of data, and the data storage range of the compression method storing 1 byte is 0 to 64; when the indication information of the compression method is 01, this indication information means that the compression method corresponds to storing 2 bytes of data, and the data storage range of the compression method storing 2 bytes is 0 to 16384; when the indication information of the compression method is 10, this indication information means that the compression method corresponds to storing 4 bytes of data, and the data storage range of the compression method storing 4 bytes is 0 to 1073741824; when the indication information of the compression method is 11, this indication information means that the compression method corresponds to storing 8 bytes of data, and the data storage range of the compression method storing 8 bytes is 0 to 4.6116860184274e+18.
[0059] Figure 3 Schematic diagram for determining the compression method of instruction nodes provided by the present invention, as Figure 3 shown, 1 byte is 8 bit, and the data storage range is 0 to 64; among them, the first two digits 00 represent the indication information of this compression method, and this indication information is used to indicate that the compression method of 1 byte stores data, and the data starts to be stored from the 3rd bit. 2 bytes are 16 bit, and the data storage range is 0 to 16384; among them, the first two digits 01 represent the indication information of this compression method, and this indication information is used to indicate that the compression method of 2 bytes stores data, and the data starts to be stored from the 3rd bit. 4 bytes are 32 bit, and the data storage range is 0 to 1073741824; among them, the first two digits 10 represent the indication information of this compression method, and this indication information is used to indicate that the compression method of 4 bytes stores data, and the data starts to be stored from the 3rd bit. 8 bytes are 64 bit, and the data storage range is 0 to 4.6116860184274e+18; among them, the first two digits 11 represent the indication information of this compression method, and this indication information is used to indicate that the compression method of 8 bytes stores data, and the data starts to be stored from the 3rd bit.
[0060] Figure 4 Schematic diagram III of the program file compression method provided by the present invention, as Figure 4 shown, this method includes:
[0061] Step 410, obtaining at least one function in the target program file.
[0062] Step 420, determining the compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length adopted when compressing the data of the instruction node.
[0063] Step 430: Write the header information and data content of the instruction node into the compressed program file in sequence based on the data length indicated by the compression method.
[0064] Optionally, write the header information of the instruction node and the data content of the instruction node into the corresponding compressed program file of the target program file in a determined compression method according to the data length indicated by the indication information of the compression method.
[0065] It should be noted that during the actual storage process, the header information of the target program file is stored first, then the header information of at least one function corresponding to the target program file is stored, and then the header information, indication information, and data content of the instruction nodes of at least one function are stored.
[0066] Specifically, taking the instruction node as an indirect jump node as an example, the data content of this indirect jump node is 58, and its corresponding storage range is 0 - 64. According to the target compression relationship, it is determined that the data of this indirect jump node corresponds to a compression method of storing 1 byte, and the indication information of this compression method is 00. The data 58 is stored starting from the 3rd bit.
[0067] In practice, if the next instruction node of this indirect jump node is an address pair node, the data content of this address pair node is [[1001, 10], [1002, 10]]; where the storage ranges corresponding to 1001 and 1002 are 0 - 16384. According to the target compression relationship, it is determined that 1001 and 1002 respectively correspond to a compression method of storing 2 bytes, and the indication information of this compression method is 01; the storage range corresponding to 10 is 0 - 64. According to the target compression relationship, it is determined that the compression method of storing 1 byte is used, and the indication information of this compression method is 00. Therefore, then store the header information of this address pair node, the indication information 01 of data 1001 and data 1001, then store the indication information 00 of the first data 10 of this address pair node and data 10; then, store the indication information 01 of data 1002 and data 1002; finally, store the indication information 00 of the second data 10 of this address pair node and data 10. And so on, store the header information, indication information, and data content of the next instruction node in sequence until the data of the instruction nodes of at least one function are written into the corresponding compressed program file of the target program file in sequence.
[0068] The program file compression method provided by the present invention dynamically determines the compression method corresponding to the data of the instruction nodes in the target program file according to the data length of the instruction nodes of the functions in the target program file, and uses the data length indicated by the compression method to write the header information and data content of the instruction nodes into the corresponding compressed program file of the target program file in the determined compression method in sequence, so as to compress the data of the instruction nodes, thereby saving the storage space of the data.
[0069] Optionally, after writing the data of the instruction nodes of the function into the corresponding compressed program file of the target program file, it is also necessary to determine whether there is still data of other instruction nodes to be compressed in the target program file; if there is data of other instruction nodes to be compressed, then according to the compression method determined previously, write the data of other instruction nodes to be compressed into the compressed program file in sequence until all the data of the instruction nodes in the target program file are processed.
[0070] Figure 5 It is a schematic diagram of the data in the compressed program file provided by the present invention, as Figure 5 shown, a target program file includes a target program file header and multiple functions, each function corresponds to a function header and multiple instruction nodes, and the multiple instruction nodes include at least one of an address pair node, a return instruction node, an indirect jump node, and a sub-function call jump node; wherein, an address pair node contains multiple address pairs, and the multiple address pairs include address pair 1 to address pair n, and the data of address pair 1 to address pair n are all represented in the form of a dynamic array; the data of the return instruction node, the indirect jump node, and the sub-function call node are also represented in the form of a dynamic array. The data of the instruction node includes the header information of the instruction node and the instruction data content, and the instruction data content is stored in the form of a dynamic array.
[0071] Optionally, the present invention also provides a program file decompression method, which can be applied to database decompression scenarios in operating systems such as the linux operating system.
[0072] Specifically, when decompressing the compressed program file, at least one function is obtained according to the compressed program file, and each function corresponds to a function attribute; wherein, the function attribute can be represented by numbers 1 to n. Therefore, according to the function attribute, the node type and header information of the instruction nodes of the function can be determined, and then according to the header information of the instruction nodes, the dynamic compression array of the instruction nodes of at least one function in the compressed program file can be obtained. Then, according to the indication information of the dynamic compression array, the compression method and the data storage range corresponding to the dynamic compression array are obtained, and then the dynamic compression array is parsed according to the compression method to obtain the data of the instruction nodes.
[0073] The program file compression device provided by the present invention will be described below. The program file compression device described below can be correspondingly referred to the program file compression method described above.
[0074] A program file compression device provided by the present invention Figure 6 is a schematic structural diagram of the program file compression device provided by the present invention. As Figure 6 shown, the program file compression device 600 includes: an acquisition module 601, a determination module 602, and a compression module 603. Among them,
[0075] The acquisition module 601 is used to acquire at least one function in the target program file.
[0076] The determination module 602 is used to determine the compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length adopted when compressing the data of the instruction node.
[0077] The compression module 603 is used to write the data of the instruction node of the function into the corresponding compressed program file of the target program file based on the compression method, so as to compress the data of the instruction node of the function through the compressed program file.
[0078] The program file compression device provided by the present invention dynamically determines the compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function in the target program file, and writes the data of the instruction node into the corresponding compressed program file of the target program file by using the data length indicated by the compression method, so as to compress the data of the instruction node, thereby saving the storage space of the data.
[0079] Optionally, the determination module 602 is specifically used for:
[0080] Determine the compression method corresponding to the data of the instruction node according to the target compression relationship and the data length of the instruction node; wherein, the target compression relationship is used to represent the corresponding relationship between the numerical range and the compression method.
[0081] Optionally, the compression method includes: indication information, and the indication information is used to indicate the corresponding compression method by using different identifiers.
[0082] Optionally, the determination module 602 is specifically used for:
[0083] Determine the target numerical range corresponding to the data length of the instruction node according to the target compression relationship;
[0084] Determine the compression method corresponding to the data of the instruction node according to the target numerical range and the target compression relationship.
[0085] Optionally, the data of the instruction node includes: header information and instruction data content. The compression module 603 is specifically configured to:
[0086] Based on the data length indicated by the compression method, write the header information of the instruction node and the data content of the instruction node into the compression program file in sequence.
[0087] Optionally, the program file compression device 600 further includes a processing module, and the processing module is specifically configured to:
[0088] Determine whether there is still data of an instruction node to be compressed in the target program file;
[0089] If so, based on the determined compression method, write the data of the instruction node to be compressed into the compression program file until all the data of the instruction nodes in the target program file are processed.
[0090] Figure 7 The entity structure diagram of the electronic device provided by the present invention is shown in Figure 7 As shown, the electronic device 700 may include: a processor 710, a communications interface 720, a memory 730, and a communication bus 740. Among them, the processor 710, the communications interface 720, and the memory 730 complete communication with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the following program file compression method: obtain at least one function in the target program file; determine the compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length adopted when compressing the data of the instruction node; based on the compression method, write the data of the instruction node of the function into the compression program file corresponding to the target program file to compress the data of the instruction node of the function through the compression program file.
[0091] In addition, when the logical instructions in the above-mentioned memory 730 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0092] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following program file compression method is implemented: obtaining at least one function in a target program file; determining a compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length adopted when compressing the data of the instruction node; based on the compression method, writing the data of the instruction node of the function into a compression program file corresponding to the target program file, so as to compress the data of the instruction node of the function through the compression program file.
[0093] In yet another aspect, an embodiment of the present invention further provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the following program file compression method is implemented: obtaining at least one function in a target program file; determining a compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length adopted when compressing the data of the instruction node; based on the compression method, writing the data of the instruction node of the function into a compression program file corresponding to the target program file, so as to compress the data of the instruction node of the function through the compression program file.
[0094] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0095] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A program file compression method, characterized in that The method includes: Obtaining at least one function in a target program file; Determining a compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length adopted when compressing the data of the instruction node; Based on the compression method, writing the data of the instruction node of the function into a compression program file corresponding to the target program file, so as to compress the data of the instruction node of the function through the compression program file; The data of the instruction node includes: header information and instruction data content, and the writing the data of the instruction node of the function into a compression program file corresponding to the target program file based on the compression method includes: Sequentially writing the header information and the instruction data content of the instruction node into the compression program file based on the data length indicated by the compression method.
2. The program file compression method according to claim 1, wherein The determining a compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function includes: Determining a compression method corresponding to the data of the instruction node according to a target compression relationship and the data length of the instruction node; wherein, the target compression relationship is used to represent the corresponding relationship between the numerical range and the compression method.
3. The program file compression method according to claim 1, wherein The compression method includes: An indication information, which is used to indicate the corresponding compression method by using different identifiers.
4. The program file compression method according to claim 2, characterized in that, The determining a compression method corresponding to the data of the instruction node according to a target compression relationship and the data length of the instruction node includes: Determining a target numerical range corresponding to the data length of the instruction node according to the target compression relationship; Determining a compression method corresponding to the data of the instruction node according to the target numerical range and the target compression relationship.
5. The program file compression method according to claim 1, wherein, After writing the data of the instruction node of the function into a compression program file corresponding to the target program file, the method further includes: Judging whether there is still data of an instruction node to be compressed in the target program file; If so, writing the data of the instruction node to be compressed into the compression program file based on the determined compression method until all the data of the instruction nodes in the target program file are processed.
6. A program file compression device, characterized in that, The device includes: An obtaining module, configured to obtain at least one function in a target program file; A determining module, configured to determine a compression method corresponding to the data of the instruction node according to the data length of the instruction node of the function; the compression method is used to represent the data length adopted when compressing the data of the instruction node; A compression module, configured to write the data of the instruction node of the function into a compression program file corresponding to the target program file based on the compression method, so as to compress the data of the instruction node of the function through the compression program file; The data of the instruction node includes: header information and instruction data content, and the compression module is specifically configured to: Sequentially write the header information and the instruction data content of the instruction node into the compression program file based on the data length indicated by the compression method.
7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, the steps of the program file compression method described in any one of claims 1 to 5 are implemented.
8. A non-transitory computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, the steps of the program file compression method described in any one of claims 1 to 5 are implemented.
9. A computer program product having executable instructions stored thereon, characterized in that, When the instruction is executed by the processor, the processor is caused to implement the steps of the program file compression method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Instruction coding method, instruction coding system and digital signal processor
CN101382884A
Remote education system based on communications network
CN206061014U