From: Roland Häder Date: Tue, 8 May 2012 22:12:41 +0000 (+0000) Subject: Some comments improved #2 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=57f03d1960de70517f197892375654d5b6dbeab7;p=hub.git Some comments improved #2 --- diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index 5ca1f31a8..bf0100033 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -999,11 +999,14 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R // 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]), @@ -1018,8 +1021,8 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R } // 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]);