presto-orc/src/main/java/io/prestosql/orc/OrcZstdDecompressor.java/OrcZstdDecompressor/decompress
class OrcZstdDecompressor:    @Override
    public int decompress(byte[] input, int offset, int length, OutputBuffer output)
            throws OrcCorruptionException
    {
        try {
            long uncompressedLength = ZstdDecompressor.getDecompressedSize(input, offset, length);
            if (uncompressedLength > maxBufferSize) {
                throw new OrcCorruptionException(orcDataSourceId, "Zstd requires buffer (%s) larger than max size (%s)", uncompressedLength, maxBufferSize);
            }

            byte[] buffer = output.initialize(toIntExact(uncompressedLength));
            return decompressor.decompress(input, offset, length, buffer, 0, buffer.length);
        }
        catch (MalformedInputException e) {
            throw new OrcCorruptionException(e, orcDataSourceId, "Invalid compressed stream");
        }
    }