// Assert on array count for a very basic validation
assert(count($decodedContent) == self::PACKAGE_CONTENT_ARRAY_SIZE);
- // Convert the indexed array into an associative array
+ /*
+ * Convert the indexed array into an associative array. This is much
+ * better to remember than plain numbers, isn't it?
+ */
$decodedContent = array(
// Compressor's extension used to compress the data
self::PACKAGE_CONTENT_EXTENSION => $decodedContent[self::INDEX_COMPRESSOR_EXTENSION],
- // Package data (aka "message") in BASE64-decoded form
+ // Package data (aka "message") in BASE64-decoded form but still compressed
self::PACKAGE_CONTENT_MESSAGE => base64_decode($decodedContent[self::INDEX_PACKAGE_DATA]),
// Tags as an indexed array for "tagging" the message
self::PACKAGE_CONTENT_TAGS => explode(self::PACKAGE_TAGS_SEPARATOR, $decodedContent[self::INDEX_TAGS]),
} // END - if
/*
- * It is the same, then decompress it, the original message is than
- * fully decoded.
+ * The checksum is the same, then it can be decompressed safely. The
+ * original message is at this point fully decoded.
*/
$decodedContent[self::PACKAGE_CONTENT_MESSAGE] = $this->getCompressorInstance()->decompressStream($decodedContent[self::PACKAGE_CONTENT_MESSAGE]);