docs: public byte[] getPacketArray(boolean reUsable) throws IOException {
  
      byte[] cachePacket = getNextCachePacket();
      if (cachePacket != null) {
        return cachePacket;
      }
  
      //loop until having the whole packet
      do {
        //Read 7 byte header
        readBlocking(header, 7);
  
        int compressedLength =
            (header[0] & 0xff) + ((header[1] & 0xff) << 8) + ((header[2] & 0xff) << 16);
        compressPacketSeq = header[3] & 0xff;
        int decompressedLength =
            (header[4] & 0xff) + ((header[5] & 0xff) << 8) + ((header[6] & 0xff) << 16);
  
        byte[] rawBytes;
        if (reUsable && decompressedLength == 0 && compressedLength < REUSABLE_BUFFER_LENGTH) {
          rawBytes = reusableArray;
        } else {
          rawBytes = new byte[decompressedLength != 0 ? decompressedLength : compressedLength];
        }
  
        readCompressBlocking(rawBytes, compressedLength, decompressedLength);
  
        if (traceCache != null) {
          int length = decompressedLength != 0 ? decompressedLength : compressedLength;
          traceCache.put(new TraceObject(false,
              decompressedLength == 0 ? COMPRESSED_PROTOCOL_NOT_COMPRESSED_PACKET
                  : COMPRESSED_PROTOCOL_COMPRESSED_PACKET,
              Arrays.copyOfRange(header, 0, 7),
              Arrays.copyOfRange(rawBytes, 0, length > 1000 ? 1000 : length)));
        }
  
        if (logger.isTraceEnabled()) {
          int length = decompressedLength != 0 ? decompressedLength : compressedLength;
          logger.trace("read {} {}{}",
              (decompressedLength == 0 ? "uncompress" : "compress"),
              serverThreadLog,
              Utils.hexdump(maxQuerySizeToLog - 7, 0, length, header, rawBytes));
        }
  
        cache(rawBytes, decompressedLength == 0 ? compressedLength : decompressedLength);
        byte[] packet = getNextCachePacket();
        if (packet != null) {
          return packet;
        }
  
      } while (true);
    }