@ApiStatus.Internal
  public ByteBuffer getByteBuffer(@NotNull HashMapZipFile file) throws IOException {
    if (uncompressedSize < 0) {
      throw new IOException("no data");
    }

    if (file.fileSize < (dataOffset + compressedSize)) {
      throw new EOFException();
    }

    switch (method) {
      case STORED:
        return computeDataOffsetIfNeededAndReadInputBuffer(file.mappedBuffer);
      case DEFLATED:
        ByteBuffer inputBuffer = computeDataOffsetIfNeededAndReadInputBuffer(file.mappedBuffer);
        Inflater inflater = new Inflater(true);
        inflater.setInput(inputBuffer);
        try {
          ByteBuffer result = DirectByteBufferPool.DEFAULT_POOL.allocate(uncompressedSize);
          while (result.hasRemaining()) {
            if (inflater.inflate(result) == 0) {
              throw new IllegalStateException("Inflater wants input, but input was already set");
            }
          }
          result.rewind();
          return result;
        }
        catch (DataFormatException e) {
          String s = e.getMessage();
          throw new ZipException(s == null ? "Invalid ZLIB data format" : s);
        }
        finally {
          inflater.end();
        }
      default:
        throw new ZipException("Found unsupported compression method " + method);
    }
  }
@ApiStatus.Internal
  public ByteBuffer getByteBuffer(@NotNull HashMapZipFile file)