Fox Fox Compact Compact Index File Format

I am trying to understand the format of the Visual FoxPro compact index file (* .IDX). I am currently referring to the Microsoft documentation for guidance.

An index is a B-tree of 512 byte nodes. Each leaf ("external") node contains several records. Each record consists of four pieces of data:

  • Line Number [FIXED LENGTH]
  • Duplicate number of bytes (the documentation does not explain this) [FIXED LENGTH]
  • Byte count of bytes (documentation does not explain this) [FIXED LENGTH]
  • Key [VARIABLE LENGTH]

Records (without their keys) are stored at the beginning of the node immediately after the node header is 24 bytes. Their keys are not included in this location because the keys differ in length, while the line number, the number of repeated bytes and the number of bytes of bytes are fixed in length. The keys are stored at the end of the node and work in reverse order. For example:

  • 24 byte header
  • line number, number of repeated bytes, byte byte counter (record No. 1)
  • line number, number of repeated bytes, byte byte counter (record No. 2)
  • line number, number of repeated bytes, byte counter (record No. 3)
  • ...
  • (entry number 3)
  • (entry number 2)
  • (entry number 1)

How to determine individual key lengths? The documentation does not indicate this. They are completely continuous (do not contain zero bytes).

. , . , .

, FoxPro xBase. , ?

+3
4

XBase:: Index Perl , node , , , . , " " ( ). , " ", :

variable_key_length = fixed_key_length - duplicate_byte_count - trailing_byte_count

, , 10 . , "DOG" node. ( , ), , , 7 ( ). , , "DOG".

+4

: , . , node, , ; , .

+1

Xbase 10 15 () ( ).

, , . , , : , , . , , , .

+1

Microsoft IDX ( , .)

0

All Articles