BlueCop
12-14-2002, 06:32 AM
this is a header file called compressfs.h it describes the compressed file system used by UltimateTV. it is used to store the WindowsCE os and interface on 3 compressed partitions. System, Browser, Storage.
#ifndef __COMPRESSFS_H
#define __COMPRESSFS_H
/*****************************************************************************
**
** This file describes the format of data on a CompressFS disk.
**
** At the begining of a CompressFS disk, there is an instance of
** a Disk structure. The Disk structure describes the disk as a whole,
** including a checksum for the entire disk, a creation date, and a count
** of the number of logical volumes that the disk contains.
**
** The d_EntryTablePos field of the Disk structure indicates where on the disk
** to find an array of Dir structrues representing the root directories of
** all the volumes for the disk. The names of these root directories are
** actually the names of the volumes.
**
** A Dir structure indicates the number of subdirectories it contains as well
** as the number of files it contains. The d_EntryTablePos field of the Dir
** structure indicates where on the disk to find an array of Dir structures
** followed by an array of File structures. The number of entries in each
** array is indicated respectively by the d_NumDirEntries and d_NumFileEntries
** fields of the Dir structure.
**
** A File structure indicates the location on the disk of the file's data.
** All data is stored contiguously. The file's data starts with an
** array of Segment structures that specify the size of each compressed
** chunk within the file. Following this array comes the actual client-level
** file data.
**
** The names of files or directories are stored within the table mentioned
** above, following each member of the array. Thus, after each File or Dir
** structure comes a NUL-terminated string which is the name of that entry.
** The name is either in Unicode or ASCII depending on the entry's header
** (see below). The maximum length of an entry name on a CompressFS volume
** is CompressFS_MaxNameSize (64).
**
** File and Dir structures are prefixed with a common Entry structure. The
** e_Flags field of an Entry structure specifies whether the entry's name is
** stored in Unicode or ASCII. The e_Compression field indicates which type
** of compression was used to compress the entry's data.
**
** The size of the File, Dir and Segment structures may be called to
** grow in the future. As a result, indexing into tables of these structures
** must be done using the structure size values specified in the Disk
** structure (see the d_FileEntrySize, d_DirEntrySize, and d_SegmentEntrySize
** fields of the Disk structure).
**
******************************************************************************/
#include <windows.h>
#ifndef __COMPRESSFS_H
#define __COMPRESSFS_H
/*****************************************************************************
**
** This file describes the format of data on a CompressFS disk.
**
** At the begining of a CompressFS disk, there is an instance of
** a Disk structure. The Disk structure describes the disk as a whole,
** including a checksum for the entire disk, a creation date, and a count
** of the number of logical volumes that the disk contains.
**
** The d_EntryTablePos field of the Disk structure indicates where on the disk
** to find an array of Dir structrues representing the root directories of
** all the volumes for the disk. The names of these root directories are
** actually the names of the volumes.
**
** A Dir structure indicates the number of subdirectories it contains as well
** as the number of files it contains. The d_EntryTablePos field of the Dir
** structure indicates where on the disk to find an array of Dir structures
** followed by an array of File structures. The number of entries in each
** array is indicated respectively by the d_NumDirEntries and d_NumFileEntries
** fields of the Dir structure.
**
** A File structure indicates the location on the disk of the file's data.
** All data is stored contiguously. The file's data starts with an
** array of Segment structures that specify the size of each compressed
** chunk within the file. Following this array comes the actual client-level
** file data.
**
** The names of files or directories are stored within the table mentioned
** above, following each member of the array. Thus, after each File or Dir
** structure comes a NUL-terminated string which is the name of that entry.
** The name is either in Unicode or ASCII depending on the entry's header
** (see below). The maximum length of an entry name on a CompressFS volume
** is CompressFS_MaxNameSize (64).
**
** File and Dir structures are prefixed with a common Entry structure. The
** e_Flags field of an Entry structure specifies whether the entry's name is
** stored in Unicode or ASCII. The e_Compression field indicates which type
** of compression was used to compress the entry's data.
**
** The size of the File, Dir and Segment structures may be called to
** grow in the future. As a result, indexing into tables of these structures
** must be done using the structure size values specified in the Disk
** structure (see the d_FileEntrySize, d_DirEntrySize, and d_SegmentEntrySize
** fields of the Disk structure).
**
******************************************************************************/
#include <windows.h>