# US 5,706,504 A · Method and system for storing data objects using a small object data stream

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 5,706,504 A
- Document ID: US5706504A
- Status: Granted
- Kind: A
- Application number: 08/477,925
- Filed: 1995-06-07
- Granted: 1998-01-06
- Earliest claimed: 1992-07-06
- Assignees: Microsoft Corporation
- Inventors: Robert G. Atkinson; Andrew L. Bliss; Philip J. Lafornara; Philip Ljubicich; Alexander G. Tilles; Antony S. Williams
- Web page: https://patentgrep.com/patent/US5706504A

## CPC

- G06F 3/0674: {Disk device}
- G06F 3/0605: {by facilitating the interaction with a user or administrator}
- G06F 3/0643: {Management of files}
- G06F 16/10: File systems; File servers
- G06F 16/9017: {using directory or table look-up (use of a directory or look-up table in file systems G06F16/13)}
- G06F 16/93: Document management systems
- Y10S 707/956: Hierarchical
- Y10S 707/99931: Database or file accessing
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

A method and system for interfacing an application program with a compound document storage system. The present invention provides an interface which an application program uses to manipulate compound documents. In a preferred embodiment, this interface is implemented in a multilayered architecture. The first layer provides methods which an application program uses to access a compound document using the functions of the second layer. The second layer maps requests to store data in the compound document to a storage format using the functions of the third layer. The third layer maps requests to write to a file to an arbitrary storage medium.

## Claims

### Claim 1

A method in a computer system for storing a plurality of objects of varying sizes in a storage area, the method comprising the steps of:
storing a directory structure in the storage area, the directory structure for referencing streams of data;
allocating a small object stream for storing multiple objects each not larger than a small object size and updating the directory structure to refer to the small object stream using a single reference;
for each object of the plurality of objects that is larger than the small object size,
allocating a stream for the object and updating the directory structure to refer to the allocated stream; and
storing the object in the allocated stream; and
for each object of the plurality of objects that is not larger than the small object size, storing the object in a portion of the small object stream such that all objects stored in the small object stream are accessed using the single reference of the directory structure.

### Claim 2 (depends on 1)

The method of claim 1 wherein the step of storing the object in a portion of the small object stream includes updating a small object allocation table stored within the small object stream.

### Claim 3 (depends on 2)

The method of claim 2 wherein the small object allocation table stored within the small object stream is arranged according to a miniFAT data structure definition.

### Claim 4 (depends on 2)

The method of claim 2 including the steps of:
designating a very small object size; and
for each object that is not larger than the very small object size, storing the object directly in the directory structure.

### Claim 5 (depends on 1)

The method of claim 1 including the step of:
when an object increases in size to be larger than the small object size,
removing the object from the small object stream;
allocating a stream for the object and updating the directory structure to refer to the allocated stream; and
storing the object in the allocated stream.

### Claim 6 (depends on 1)

The method of claim 1 wherein the storage area has a plurality of fixed-size sectors, including the steps of:
storing a storage allocation table on the storage area for linking together the sectors that comprise a stream;
designating a small object stream sector size; and
storing within the small object stream another storage allocation table for linking together objects that are larger than the small object stream sector size and that are not larger than the small object size.

### Claim 7 (depends on 1)

The method of claim 1, further comprising the steps of:
receiving a request for an object that is not larger than the small object size; and
using the single reference of the directory structure that refers to the small object stream, retrieving the stored object from the portion of the small object stream.

### Claim 8 (depends on 1)

The method of claim 1 wherein the directory structure is arranged according to an MS-DOS file system architecture.

### Claim 9 (depends on 1)

The method of claim 1 wherein the storage area is used to implement a file system.

### Claim 10 (depends on 1)

The method of claim 1 wherein the storage area is located in computer memory.

### Claim 11 (depends on 1)

The method of claim 1 wherein the storage area is located in external computer memory such as on a disk.

### Claim 12

A method in a computer system for storing objects of varying sizes in a data storage area, the data storage area having a plurality of data storage sub-areas, the method comprising the steps of:
allocating a data storage sub-area for storing multiple objects that are less than a predefined size;
when an object is greater than or equal to the predefined size,
allocating a data storage sub-area for the object; and
storing the object in the allocated data storage sub-area for the object; and
when an object is less than the predefined size,
storing the object in a portion of the allocated data storage sub-area for storing objects that are less than the predefined size, such that a plurality of objects that are less than the predefined size are stored within a single storage sub-area.

### Claim 13

A computer-readable memory medium containing instructions for controlling a computer processor in a computer system to store objects of varying sizes in a storage area by performing the steps of:
storing a directory structure in the storage area, the directory structure for referencing streams of data;
allocating a small object stream for storing multiple objects each not larger than a small object size and updating the directory structure to refer to the small object stream using a single reference;
for each object of the plurality of objects that is larger than the small object size,
allocating a stream for the object and updating the directory structure to refer to the allocated stream; and
storing the object in the allocated stream; and
for each object of the plurality of objects that is not larger than the small object size, storing the object in a portion of the small object stream such that all objects stored in the small object stream are accessed using the single reference of the directory structure.

### Claim 14 (depends on 13)

The computer-readable memory medium of claim 13 wherein the step of storing the object in a portion of the small object stream includes updating a small object allocation table stored within the small object stream.

### Claim 15 (depends on 13)

The computer-readable memory medium of claim 13 further including performing the steps of:
designating a very small object size; and
for each object that is not larger than the very small object size, storing the object directly in the direct.

### Claim 16 (depends on 13)

The computer-readable memory medium of claim 13 further including performing the steps of: when an object increases in size to be larger than the small object size,
removing the object from the small object stream;
allocating a stream for the object and updating the directory structure to refer to the allocated stream; and
storing the object in the allocated stream.

### Claim 17 (depends on 13)

The computer-readable memory medium of claim 13 wherein the storage area has a plurality of fixed-size sectors, including the steps of:
storing a storage allocation table on the storage area for linking together the sectors that comprise a stream;
designating a small object stream sector size; and
storing within the small object stream another storage allocation table for linking together objects that are larger than the small object stream sector size and that are not larger than the small object size.

### Claim 18 (depends on 13)

The computer-readable memory medium of claim 13 further including performing the steps of:
receiving a request for an object that is not larger than the small object size; and
using the single reference of the directory structure that refers to the small object stream, retrieving the stored object from the portion of the small object stream.

### Claim 19

A memory for storing data for access by a program being executed on a computer system, comprising:
a data structure stored in the memory, the data structure having data that represents a file system, the data structure containing:
a small object data stream containing a plurality of objects that are not larger than a small object size;
a plurality of data streams, each of which contains an object that is larger than the small object size; and
a directory structure containing a single reference to the small object data stream and a plurality of references each of which refers to one of the plurality of data streams, such that an object that is larger than the small object size is retrieved from the directory structure using its own reference and an object that is not larger than the small object size is retrieved from the directory structure using the single reference to the small object data stream.

### Claim 20 (depends on 19)

The memory of claim 19 wherein the small object data stream of the data structure further contains a small object allocation table used to locate an object that is not larger than the small object size within the small object data stream.

### Claim 21

A method in a computer system for storing a plurality of objects of varying sizes in a storage area and for dynamically changing a location where the objects of varying sizes are stored, the method comprising:
storing a directory structure in the storage area, the directory structure having entries that reference streams of data;
allocating a small object directory entry in the directory structure for storing multiple objects each not larger than a small object size;
for each object of the plurality of objects that is not larger than the small object size,
when there is sufficient remaining storage in the small object directory entry for storing the object, storing the object in a portion of the small object directory entry such that all objects that are not larger than the small object size are accessed using a single reference to the small object directory entry; and
when there is not sufficient remaining storage in the small object directory entry for storing the object,
allocating a small object stream for storing multiple objects that are not larger than the small object size;
copying each of the objects stored in the small object directory entry to a portion of the allocated small object stream;
updating the small object directory entry to refer to the small object stream using a single reference; and
storing the object in another portion of the small object stream such that all objects stored in the small object stream are accessed using the single reference of the small object directory entry; and
for each object of the plurality of objects that is larger than the small object size,
allocating a stream for the object and updating a directory entry in the directory structure to refer to the allocated stream; and
storing the object in the allocated stream.

### Claim 22 (depends on 21)

The method of claim 21 wherein the copying of each of the objects stored in the small object directory entry to the portion of the allocated small object stream includes updating a small object allocation table stored within the small object stream.

### Claim 23 (depends on 22)

The method of claim 22 wherein the small object stream comprises a plurality of fixed-size minisectors and the small object allocation table is a miniFAT that links together the fixed-size minisectors of the small object stream.

### Claim 24 (depends on 23)

The method of claim 23 wherein the storage area has a plurality of fixed-size sectors and wherein each minisector is 64 bytes, such that a plurality of minisectors can be stored in one of the fixed-size sectors of the storage area.

### Claim 25 (depends on 21)

The method of claim 21, further comprising:
when an object increases in size to be larger than the small object size and when the object has been previously store in the small object stream,
removing the object from the small object stream;
allocating a stream for the object and updating the directory structure to refer to the allocated stream; and
storing the object in the allocated stream.

### Claim 26

A computer-readable memory medium containing instructions for controlling a computer processor in a computer system to storing a plurality of data collections of varying sizes in a storage area and for dynamically changing a location where the data collections of varying sizes are stored, by performing:
storing a directory structure in the storage area, the directory structure having entries that reference streams of data;
allocating a small data collection directory entry in the directory structure for storing multiple data collections each smaller than a chosen small size;
for each data collection of the plurality of data collections that is smaller than the chosen small size,
when there is sufficient remaining storage in the small data collection directory entry for storing the data collection, storing the data collection in a portion of the small data collection directory entry such that all data collections that are smaller than the chosen small size are accessed using a single reference to the small data collection directory entry; and
when there is not sufficient remaining storage in the small data collection directory entry for storing the data collection,
allocating a small data stream for storing multiple data collections that are smaller than the chosen small size;
copying each of the data collections stored in the small data collection directory entry to a portion of the allocated small data stream;
updating the small data collection directory entry to refer to the small data stream using a single reference; and
storing the data collection in another portion of the small data stream such that all data collections stored in the small data stream are accessed using the single reference of the small data collection directory entry; and
for each data collection of the plurality of data collections that is not smaller than the chosen small size,
allocating a stream for the data collection and updating a directory entry in the directory structure to refer to the allocated stream; and
storing the data collection in the allocated stream.
