Esempio n. 1
0
 static function ReadString($bytearray, &$seek, $tagfirst, $pubdict, $localdict)
 {
     $inDict = ($tagfirst & 32) > 0;
     $isPubDict = ($tagfirst & 16) > 0;
     $keylength = $tagfirst % 16;
     if ($inDict) {
         $id = JsonPack::ReadIntPiece($bytearray, $seek, $keylength);
         if ($isPubDict) {
             return $pubdict[$id];
         } else {
             return $localdict[$id];
         }
     } else {
         return JsonPack::ReadStringPiece($bytearray, $seek, $keylength);
     }
 }