X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=contrib%2Ffile_stack%2Fformat.txt;h=336428dbbcf26fc5e1b1daccf362c249fd2921b6;hb=1d80851e8823f5cb20bdfddda4bbbacd8a71aaf8;hp=03b6165207ab9007c00af39db8c2d2413d197624;hpb=3823de7144fa4f53fd520520f1ce51f1d12c2af8;p=core.git diff --git a/contrib/file_stack/format.txt b/contrib/file_stack/format.txt index 03b61652..336428db 100644 --- a/contrib/file_stack/format.txt +++ b/contrib/file_stack/format.txt @@ -5,19 +5,19 @@ This is the format for a file-based stack which works as any Stackable class. General made up: -Purpose: | "magic" | separator | count | position | separator | ----------+-----------+-----------+----------+---------------+-----------+ -Bytes: | 9 | 1 | 20 (hex) | 2 - n^2 (hex) | 1 | ----------+-----------+-----------+----------+---------------+-----------+ -Example: | STACKv1.0 | ??? | 00...ff | 01 | ??? | +Purpose: | "magic" | separator | count | separator | position | separator | +---------+-----------+-----------+----------+-----------+------0---+-----------+ +Bytes: | 9 | 1 | 20 (hex) | 1 | 20 (hex) | 1 | +---------+-----------+-----------+----------+-----------+----------+-----------+ +Example: | STACKv1.0 | 01 | 00...ff | 01 | 00...ff | 02 | Continued: Purpose: | hash 0 | separator | name 0 | entry 0 | hash n | separator | name n | entry n | EOF | ---------+--------+-----------+--------+------------+--------+-----------+--------+------------+-----+ -Bytes: | ??? | 1 | 10 | 1-n (pack) | ??? | 1 | 10 | 1-n (pack) | 1 | +Bytes: | 64 | 1 | 10 | 1-n (pack) | 64 | 1 | 10 | 1-n (pack) | 1 | ---------+--------+-----------+--------+------------+--------+-----------+--------+------------+-----+ -Example: | abc | ??? | foo | ... | abc | ??? | bar | ... | EOF | +Example: | abc | 03 | foo | ... | abc | 03 | bar | ... | EOF | Explanations: ------------- @@ -25,8 +25,9 @@ Explanations: separator - Serves to detect end of strings with unknown/flexible length count - Total amount of entries (not deleted) encoded in hexa-decimal position - Seek position of current entry (which current() will give) - hash X - Hash sum of entry X + hash X - Hash sum of entry X (SHA 256) name X - Name of stack the entries belongs in entry X - The actual data, compressed with pack() EOF - End-of-file character + ... - Data ??? - Must be still found out which character/hashing algorthym fits best