aboutsummaryrefslogtreecommitdiff
path: root/src/org/tukaani/xz/LZMA2InputStream.java
AgeCommit message (Collapse)Author
2017-12-28Add ArrayCache support to LZMA and LZMA2 coders, part 1.Lasse Collin
This assumes that the sizes of the arrays from the cache will match the requested size. This works with BasicArrayCache but isn't compliant with the ArrayCache API yet.
2017-10-11Fix LZMA2InputStream.available() for uncompressed chunks.Lasse Collin
It could return a too high value when in the middle of an uncompressed chunk.
2017-06-05Improve buffer handling in RangeDecoderFromBuffer.Lasse Collin
This way errors get detected slightly quicker and we avoid the need to check if the buffer position is still OK.
2014-03-03Use fields for temp buffers in read() and write(int).Lasse Collin
This avoids reallocating memory for each call. This reduces pressure on the garbage collector and in practice lowers the memory used by the java process significantly when read() and write(int) functions are used a lot. On the other hand, this is stupid since most of the time the read() and write(int) aren't (hopefully) used since one gets better performance with functions that process arrays of bytes. Thus, for most uses cases this commit means that we are allocating a few unused one-byte buffers that weren't previously allocated at all. Similar thing was done earlier in the LZMA encoder in the commit ec224582e44776a53874346dfe703dbbfcc6bd15.
2013-05-30Split RangeDecoder into RangeDecoderFromBuffer and FromStream.Lasse Collin
To support LZMA1, support for reading from an InputStream is needed. LZMA1-specific features are in FromStream while LZMA2-specific features are in FromBuffer. Move the rc.isInBufferOK() from LZMADecoder to LZMA2InputStream since that is a LZMA2-specific thing.
2013-05-30Comment improvements to LZMA2InputStream.Lasse Collin
2011-08-16Shorten exception messages of closed input streams.Lasse Collin
2011-08-08Small fixes to input streams.Lasse Collin
All public input streams: - If the stream has been closed and the function does something I/O related, throw an exception. - Don't call in.close() multiple times if close() is called more than once. All raw decoders: - Check if the input stream is null because otherwise the constructor won't detect it. LZMA2InputStream: - Handle presetDict == null correctly. - Remove "throws IOException" from constructors. SeekableXZInputStream, SimpleInputStream: - Add available(). There are also related javadoc updates.
2011-07-30Use the correct exception with invalid args in .read and .write.Lasse Collin
Input and output streams now throw IndexOutOfBoundsException if given invalid buffer offset or length is given to .read or .write functions.
2011-07-26Emphasize the raw input and output streams aren't XZ.Lasse Collin
2011-05-20Refactor the locations of internal classes and remove RawDecoder.Lasse Collin
The functionality of RawDecoder is now integrated into BlockInputStream.
2011-03-30Initial commit.Lasse Collin
This supports only decompression in streamed mode using LZMA2 and Delta filters. The integrity checks None, CRC32, CRC64, and SHA-256 are supported.