Browse Prior Art Database

Aligning Zip Elements For Use In Memory

IP.com Disclosure Number: IPCOM000013275D
Original Publication Date: 1999-Dec-01
Included in the Prior Art Database: 2003-Jun-18
Document File: 3 page(s) / 46K

Publishing Venue

IBM

Related People

Patrick Mueller: AUTHOR [+2]

Abstract

The ZIP file format is widely used as a file archive format on computer systems. It allows multiple files to be stored in one single file. The format of the ZIP file allows for easily adding new files to the ZIP file or retrieving the data for a file from the ZIP file. The ZIP file format is documented in the document available via the URL: ftp://ftp.uu.net/pub/archiving/zip/doc/appnote-970311-iz.zip Because the ZIP format is a widely used format, and many tools and programming libraries exist to read and write ZIP files, it is logical to use the format when programs need to store multiple files in one archive. In this light, it is advantageous to use the existing ZIP file format to store multiple files in one file that will end up being stored in ROM memory. There are many benefits to this: just one file to worry about instead of many existing utilities exist to test, view the contents, and extract single files from the ZIP file.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 47% of the total text.

Page 1 of 3

Aligning Zip Elements For Use In Memory

The ZIP file format is widely used as a file archive format on computer systems. It allows multiple files to be stored in one single file. The format of the ZIP file allows for easily adding new files to the ZIP file or retrieving the data for a file from the ZIP file.

The ZIP file format is documented in the document available via the URL: ftp://ftp.uu.net/pub/archiving/zip/doc/appnote-970311-iz.zip Because the ZIP format is a widely used format, and many tools and programming libraries exist to read and write ZIP files, it is logical to use the format when programs need to store multiple files in one archive.

In this light, it is advantageous to use the existing ZIP file format to store multiple files in one file that will end up being stored in ROM memory. There are many benefits to this:
- just one file to worry about instead of many - existing utilities exist to test, view the contents, and extract single files from the ZIP file.

The downside is that the ZIP format does not align the data for the files that are stored inside it. Alignment is a technique to keep computer data in memory in such a way that the address of the data is always a multiple of some integral value, such as 4 or 8. In many cases, data which is aligned can be accessed much faster than unaligned data. In some cases, unaligned data cannot even be accessed by the CPU.

For instance, say a 4 byte integer is stored in memory. If the CPU is optimized to read aligned data on 4 byte boundaries, the following cases exist: - address is divisible by 4: data is aligned - address + 1 is divisible by 4: data is unaligned - address + 2 is divisible by 4: data is unaligned - address + 3 is divisible by 4: data is unaligned

Accordingly, it would be advantageous for the data in ZIP files to be aligned. However, the ZIP format has no provision to align the data.

This disclosure describes a technique that can be used to create ZIP files that conform to the ZIP file specification, can be accessed by existing tools and programming libraries that access ZIP files, and have the additional benefit of aligning the file entries in the zip file on an
arbitrary size boundary.

Further, the benefits of using the ZIP format apply to the resulting ZIP file, and also keep the file contents aligned. Otherwise, a completely different file format would be required, which means existing ZIP tools and programming libraries would not be able to access these files.

Each file stored in a ZIP file has an element called a local header associated with it, which is stored immediately preceding the data for the file. The local header has the following fields:

local file header signature 4 bytes (0x04034b50)

version needed to extract 2 bytes

1

Page 2 of 3

general purpose bit flag 2 bytes

compression method 2 bytes

last mod file time 2 bytes

last mod file date 2 bytes

crc-32 4 bytes

compressed size 4 bytes

uncompressed size 4 bytes

filename length 2 bytes

extra fiel...