const SEPARATOR_HEADER_ENTRIES = 0x02;
/**
- * Separator hash->name
+ * Separator group->hash
*/
- const SEPARATOR_HASH_NAME = 0x03;
+ const SEPARATOR_GROUP_HASH = 0x03;
+
+ /**
+ * Separator hash->value
+ */
+ const SEPARATOR_HASH_VALUE = 0x04;
/**
* Separator entry->entry
*/
- const SEPARATOR_ENTRIES = 0x04;
+ const SEPARATOR_ENTRIES = 0x05;
/**
* Separator type->position
*/
- const SEPARATOR_TYPE_POSITION = 0x05;
+ const SEPARATOR_TYPE_POSITION = 0x06;
/**
* Length of count
const LENGTH_POSITION = 20;
/**
- * Length of name
+ * Length of group
*/
- const LENGTH_NAME = 10;
+ const LENGTH_GROUP = 10;
/**
* Maximum length of entry type
// Call block instance
$this->getBlockInstance()->flushFileHeader();
}
+
+ /**
+ * Searches for next suitable gap the given length of data can fit in
+ * including padding bytes.
+ *
+ * @param $length Length of raw data
+ * @return $seekPosition Found next gap's seek position
+ */
+ public function searchNextGap ($length) {
+ // If the file is only gaps, no need to seek
+ if ($this->isFileOnlyGaps()) {
+ // The first empty block is the first one right after the header
+ return ($this->getHeaderSize() + 1);
+ } // END - if
+
+ // @TODO Unfinished
+ $this->partialStub('length=' . $length);
+ }
}
// [EOF]