File packing and reading method based on Hash

A file reading and file technology, applied in instruments, calculations, electrical digital data processing, etc., can solve problems such as time-consuming, indexing speed needs to be improved, software product safety hazards, etc., and achieve the effect of improving the reading speed

Active Publication Date: 2013-01-16
ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD +1
View PDF4 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the packaging process, due to the use of traditional index methods such as binary or B+ trees, the indexing speed still needs to be improved; at the same time, because the traditional package file uses the file path name as the unique identifier of the file in the package, it is necessary to perform string The one-by-one comparison of

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File packing and reading method based on Hash
  • File packing and reading method based on Hash
  • File packing and reading method based on Hash

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0026] The specific embodiments of the present invention will be further described below in conjunction with the drawings:

[0027] A hash-based file packaging and reading method is to complete the writing and reading operations of the files in the package through the packaging process and the package reading process.

[0028] Reference figure 1 The package file in the package file is the process of writing the file into the package file during the packaging process, which is completed by the packaging tool. The packaging tool receives the following input information:

[0029] 1. The file directory or file list to be packaged;

[0030] 2. The hash algorithm used;

[0031] 3. Output mode and output location.

[0032] Reference figure 2 , A file packaging method based on hash, the packaging method includes the following steps:

[0033] A. Read the files to be packaged in sequence;

[0034] The packaging tool reads the corresponding file from the disk according to the input information, and...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a file packing and reading method based on Hash. The packing method comprises the steps as follows: reading files required to be packed in sequence; calculating the Hash values of the paths of the files; writing the files into a file data region; writing the Hash values and the offset values of the files into a Hash table; and finishing the writing operation of all the files. The reading method comprises the steps as follows: obtaining the Hash values of the paths of the files in the packs through read-in file index information; searching the corresponding offset values in the Hash table; and reading data files corresponding to the offset values in the file data region. According to the file packing and reading method, the identifications of the files in the packs adopt the Hash values and the string matching operation does not need to be performed in the search process; the indexes adopt the Hash table, so that the offset addresses can be quickly positioned; and the original directory structure cannot be recovered through the files in the packs. The file packing and reading method can be widely applied to the field of computer software.

Description

technical field [0001] The invention relates to a file packaging and reading method, in particular to a hash-based file packaging and reading method. Background technique [0002] Existing software client resources are usually stored in a packaged manner, so as to obtain advantages such as convenient transmission, resource confidentiality, and faster access speed. In the packaging process, due to the use of traditional index methods such as binary or B+ trees, the indexing speed still needs to be improved; at the same time, because the traditional package file uses the file path name as the unique identifier of the file in the package, it is necessary to perform string The one-by-one comparison of characters in is relatively time-consuming. During the reading process, since the index information in the package file stores the path information of the files in the package, malicious users can use this information to completely restore the directory structure of the file befor...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F17/30
Inventor 陈飞舟吴才忠刘畅
Owner ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products