In-Place ZIP Archive Editing via Segmented Block Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing ZIP file format does not support efficient read-write access or in-place editing, requiring the entire file to be rewritten upon modification, which limits its flexibility and efficiency for native data storage applications.
Innovation Solution
The implementation of a free-block list management system that allows for append mode and automatic growth/reclamation modes, enabling efficient in-place editing and data recovery within the ZIP archive, while maintaining compliance with either ZIP32 or ZIP64 specifications.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the entire ZIP archive is rewritten whenever a file is modified, then the file structure remains intact and simple to manage, but the operation time and storage bandwidth consumption increase significantly
Solution Approach 1:
The patent divides the ZIP archive into discrete file blocks with independent headers and data sections. Each block can be modified independently without affecting other blocks, enabling selective updates rather than complete rewrites. The central directory maintains references to these segmented blocks, allowing efficient random access and modification of individual files within the archive.
Solution Approach 2:
The patent introduces dynamic block management where file blocks can be allocated, deallocated, and relocated within the archive. The system maintains a free block list and uses virtual file system concepts to dynamically manage block assignments, allowing files to be modified in-place or relocated without rewriting the entire archive structure.
2Reliability
If the entire ZIP archive is rewritten whenever a file is modified, then data consistency is maintained, but the storage bandwidth consumption increases
Solution Approach 1:
The patent segments the archive into independent blocks that can be updated locally. Only the modified block and its corresponding directory entries are rewritten, rather than the entire archive. This segmentation dramatically reduces the amount of data that must be transmitted and written to storage during modification operations.
Solution Approach 2:
The patent extracts the modification operation from the global archive rewrite process. By isolating file blocks as independent units with their own headers and data, the system can apply changes locally without triggering a complete archive rewrite, thus reducing storage bandwidth consumption while maintaining data consistency through the updated central directory references.
3Device complexity
If the ZIP format uses a simple linear structure with central directory, then the format remains simple and compatible, but read-write manipulation capability is limited
Solution Approach 1:
The patent extends the simple linear ZIP structure by introducing segmented block architecture where each file is a discrete block with header and data sections. This segmentation enables random access and in-place modification of individual blocks while maintaining the overall simplicity of the ZIP format. The central directory continues to provide the index, but now references discrete modifiable blocks rather than a monolithic structure.
Solution Approach 2:
The patent adds dynamic capabilities to the static ZIP format by introducing block allocation management, free block lists, and virtual file system concepts. These dynamic mechanisms enable in-place editing, block relocation, and flexible read-write operations without fundamentally changing the simple linear structure or requiring complex new format specifications.
4Quantity of substance
If the ZIP format is designed for read-only archival, then storage space is optimized and format is simple, but in-place editing capability is lost
Solution Approach 1:
The patent segments the archive into modifiable blocks that can be edited in-place. Each block maintains its own header and data sections, allowing direct modification without requiring allocation of additional storage space for copies. This segmentation enables in-place editing while preserving the storage space efficiency of the original read-only format.
Solution Approach 2:
The patent performs preliminary block allocation and header preparation during archive creation, establishing a structure that facilitates future in-place modifications. By pre-dividing the archive into manageable blocks with proper headers and maintaining a free block list, the system enables efficient in-place editing without requiring additional storage overhead or complex rewrite operations.
Data Source
AI summary
A method, apparatus, and article of manufacture provide the ability to edit in-place a ZIP™ archive file. A file and a first file block (FFB) in a first block location are opened and modified. If the first block location can accommodate the modified FFB, the modified FFB is saved, in-place, in the first block location without rewriting the entire archive. However, if the first block location cannot accommodate the modified FFB, a second file block is copied from a second block location to a third block location located at an end of a file data section of the archive. A portion of the second block location is marked as a free block and the modified FFB is saved without rewriting the entire ZIP™ archive. The archive is then saved by updating and saving both the central directory and end of central directory.


