]> git.mxchange.org Git - hub.git/commitdiff
Some comments improved #2
authorRoland Häder <roland@mxchange.org>
Tue, 8 May 2012 22:12:41 +0000 (22:12 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 8 May 2012 22:12:41 +0000 (22:12 +0000)
application/hub/main/package/class_NetworkPackage.php

index 5ca1f31a81c23a14c0f35395f8eff5043b780638..bf01000339ad7f9902cfc939b3a9716905270da3 100644 (file)
@@ -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]);