Enscribe Programmer's Guide

Figure 29 Header for Bit-Map Block
common-block-header
Offset
(Decimal)
0
14
18
14
Length
in
Bytes
4 stib-eerf-fo-rebmun
block size - 18
bit-map
The fields in Figure 29 are defined as:
common-block-header
is the 14-byte common block header shown in Figure 24.
number-of-free-bits
indicates how many bits in this bit-map identify blocks that are free (empty) in a key-sequenced
or queue file. For relative files, it indicates how many bits identify blocks that are not full.
bit-map
is an array of bits describing availability of index or data blocks. For a key-sequenced or queue
file, each bit tells whether the corresponding block is free (0) or in use (1). For a relative file,
each bit tells whether there is room for at least one more record in the corresponding block.
An empty bit-map has (8 * (block-size - 18) ) free bits.
With a 1024-byte block, for example, the map has 8048 available bits.
Figure 30 Arrangement of Bit-Map Blocks
header
data or index block
data or index block
header
data or index block
data or index block
bits b(1) b(2) b(3) . . . b(n)
bits b(1) b(2) b(3) . . . b(n)
Block 0 is the
first
bit-map block.
Block 1
Block N
Block N+1
Block N+2
Block 2N+1
174 Block Formats of Structured Files