Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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 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 before packaging, which brings security risks to software products

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

Embodiment Construction

[0026] The specific embodiment of the present invention will be further described below in conjunction with accompanying drawing:

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

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

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

[0030] 2. The hash algorithm used;

[0031] 3. Output method and output location.

[0032] refer to figure 2 , a hash-based file packaging method, the packaging method comprising the following steps:

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

[0034] The packaging tool reads the corresponding files from the disk according to the...

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
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More