Directory - DEPRECATED


Purpose

In WHIP! version 0.55, it was possible to store WHIP! data as blocks. In WHIP! data that has block structure, the Directory opcode serves as a directory of blocks contained in WHIP! data. The Directory opcode contains a list of serialized block-reference opcodes enabling quick and easy access to WHIP! data blocks. Syntax
Opcode format Opcode Operand Format Comments
Extended ASCII (Directory <Ltotal_number_of_blocks>(<BlockRefblockref>)\
(<BlockRefblockref>)<more blockrefs>\
<ULdirectory_beginning_file_offset>)\
-
Extended Binary 0x0160 <Ltotal_number_of_blocks>(<BlockRefblockref>)
(<BlockRefblockref>)<more blockrefs>
<ULdirectory_beginning_file_offset>)+}
-
Total Number of blocks   Represents the number of blockref items that the directory holds.
Blockrefs  List of serialized BlockRef opcodes. There will be as many BlockRef opcode instances serialized as there are number of blocks present in WHIP! data.
File_offset  The beginning data offset of the Directory opcode.


Notes

Using the Directory opcode, applications can readily access WHIP! data blocks by jumping to and reading WHIP! data blocks using the file offset and block size information maintained as part of Directory, and they can subsequently edit and update block attributes — Blockrefs. Additionally, parent applications can also add new WHIP! data blocks at the end by over-writing the directory and re-writing the updated directory information at the end again.

Note: There can be only one instance of the Directory opcode serialized in any WHIP! data. The Directory opcode is always serialized in uncompressed format in order to enable BlockRef opcode edits.
 

Examples Example 1
  (Directory 1
(BlockRef 'Null' 00000000012 00000604213 1 1 ) 604225)


The above sample directory demonstrates the case where there is only one block in the WHIP! data.

Table 1. Directory example values and fields
Values Fields
‘Null’  Blockref format of the one and only block contained in the WHIP! data.
12 Beginning file offset of the first and only block.
6042313 Null block length in bytes
1 Null block’s Block validity
1 Null block’s visibility flag
604225 Beginning file offset of the directory information.

Example 2
 

(Directory 00000000005
(BlockRef 'Thumbnail' 00000001042 00000005166
   (Guid 4034564648 47116 20327
 9D5CB332EF905251 )
   (Time 00993754886 00000000000)
   (Time 00993754886 00000000000)
   (Encryption 'None     ') 1
   (Guid 3106285833 18307 18612
       A7D73D9646C3C714 ) 00000000000 00000000170 00000000219 00000000256
           ((00000000001 00000000000 00000000000 00000000000)
           (00000000000 00000000001 00000000000 00000000000)
           (00000000000 00000000000 00000000001 00000000000)
            (00000000000 00000000000 00000000000 00000000001)) )
(BlockRef 'Graphics' 00000006208 00000001628
   (Guid 3106285833 18307 18612
       A7D73D9646C3C714 )
   (Time 00993754886 00000000000)
   (Time 00993754886 00000000000) 1 )
(BlockRef 'Preview' 00000007836 00000009601
   (Guid 1910297973 33267 17182
       93C07773644F3B8C )
   (Time 00993754886 00000000000)
   (Time 00993754886 00000000000)
   (Encryption 'None     ') 1
   (Guid 3106285833 18307 18612
       A7D73D9646C3C714 ) 00000000000 00000000438 00000000566 00000000256
           ((00000000001 00000000000 00000000000 00000000000)
           (00000000000 00000000001 00000000000 00000000000)
           (00000000000 00000000000 00000000001 00000000000)
           (00000000000 00000000000 00000000000 00000000001)) )
(BlockRef 'Redline_Hdr' 00000017437 00000000530
   (Guid 3470372517 35997 17586
       95993C98BE337DD8 )
   (Time 01616921476 00029425669)
   (Time 01616921476 00029425669)
   (Encryption 'None     ') 1 1
   (Guid 2365419389 1115 17309
       AB885866DE02CBA5 ) 00000000000 0 0 0 000000.0025
   (Orientation 'Always_In_Sync  ')      0
   (Alignment 'Align_None        ') 00000000765 00000000055    399 000.0312505 00000.03125 02147479958,00000003088
       2147480723,00000003143
   (Psswd '(ì_                             ') )
(BlockRef 'Redline' 00000017967 00000000438
   (Guid 2365419389 1115 17309
       AB885866DE02CBA5 )
   (Time 01616921476 00029425669)
   (Time 01616921476 00029425669) 1 ) 00000018405)


The above directory represents 5 blocks.
 

Default For example, an ASCII default directory of WHIP! data having no blocks (Directory 00000000000  00000602468).