docs: public static void doByteBufferPutCompressed(INDArray arr, ByteBuffer allocated, boolean rewind) {
          CompressedDataBuffer compressedDataBuffer = (CompressedDataBuffer) arr.data();
          CompressionDescriptor descriptor = compressedDataBuffer.getCompressionDescriptor();
          ByteBuffer codecByteBuffer = descriptor.toByteBuffer();
          ByteBuffer buffer = arr.data().pointer().asByteBuffer().order(ByteOrder.nativeOrder());
          ByteBuffer shapeBuffer = arr.shapeInfoDataBuffer().pointer().asByteBuffer().order(ByteOrder.nativeOrder());
          allocated.putInt(arr.rank());
          //put data opType next so its self describing
          allocated.putInt(arr.data().dataType().ordinal());
          //put shape next
          allocated.put(shapeBuffer);
          //put codec information next
          allocated.put(codecByteBuffer);
          //finally put the data
          allocated.put(buffer);
          if (rewind)
              allocated.rewind();
      }