/**
* Separator magic->count
*/
- const SEPARATOR_MAGIC_COUNT = 0x00;
+ const SEPARATOR_MAGIC_COUNT = 0x01;
+
+ /**
+ * Separator count->position
+ */
+ const SEPARATOR_COUNT_SEEK_POS = 0x02;
/**
* Separator position->entries
*/
- const SEPARATOR_SEEK_POS_ENTRIES = 0xff;
+ const SEPARATOR_SEEK_POS_ENTRIES = 0x03;
/**
* Separator hash->name
*/
- const SEPARATOR_HASH_NAME = 0x05;
+ const SEPARATOR_HASH_NAME = 0x04;
/**
* Length of name
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
// Put all informations together
- $header = sprintf('%s%s%s%s%s',
+ $header = sprintf('%s%s%s%s%s%s',
// Magic
self::STACK_MAGIC,
// Total entries (will be zero) and pad it to 20 chars
str_pad($this->dec2hex($this->getCounter()), self::COUNT_LENGTH, '0', STR_PAD_LEFT),
+ // Separator count<->seek position
+ chr(self::SEPARATOR_COUNT_SEEK_POS),
+
// Position (will be zero)
- str_pad($this->dec2hex(0, 2), self::COUNT_POSITION, '0', STR_PAD_LEFT),
+ str_pad($this->dec2hex($this->getSeekPosition(), 2), self::COUNT_POSITION, '0', STR_PAD_LEFT),
// Separator position<->entries
chr(self::SEPARATOR_SEEK_POS_ENTRIES)