Package io.github.mahmoudimus.zstd
Class ZstdInputStream
java.lang.Object
java.io.InputStream
io.github.mahmoudimus.zstd.ZstdInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Decompresses Zstandard data read from another stream. Output is produced a block (at most 128
KiB) at a time, so reading a capped amount from a hostile stream costs no more than that much
work and memory, plus the frame's window.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
ZstdInputStream
Decodesinwith default settings.- Parameters:
in- compressed input; closing this stream also closes the input
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
available
public int available()- Overrides:
availablein classInputStream
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-