From 1db8f800e59fd7189994f17233193f72731f6653 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 14 Apr 2013 14:58:39 +0300 Subject: Comment improvements to SeekableXZInputStream. --- src/org/tukaani/xz/SeekableXZInputStream.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/org/tukaani/xz/SeekableXZInputStream.java') diff --git a/src/org/tukaani/xz/SeekableXZInputStream.java b/src/org/tukaani/xz/SeekableXZInputStream.java index 57932c1..308cad3 100644 --- a/src/org/tukaani/xz/SeekableXZInputStream.java +++ b/src/org/tukaani/xz/SeekableXZInputStream.java @@ -32,10 +32,10 @@ import org.tukaani.xz.index.BlockInfo; *

* To make random access possible, the data in a .xz file must be splitted * into multiple Blocks of reasonable size. Decompression can only start at - * a Block boundary. When seeking to an uncompressed offset that is not at + * a Block boundary. When seeking to an uncompressed position that is not at * a Block boundary, decompression starts at the beginning of the Block and - * throws away data until the target offset is reached. Thus, smaller Blocks - * mean faster seeks to arbitrary uncompressed offsets. On the other hand, + * throws away data until the target position is reached. Thus, smaller Blocks + * mean faster seeks to arbitrary uncompressed positions. On the other hand, * smaller Blocks mean worse compression. So one has to make a compromise * between random access speed and compression ratio. *

@@ -57,15 +57,17 @@ import org.tukaani.xz.index.BlockInfo; *

* When using {@link XZOutputStream}, a new Block can be started by calling * its {@link XZOutputStream#endBlock() endBlock} method. If you know - * that the decompressor will need to seek only to certain offsets, it can - * be a good idea to start a new Block at (some of) these offsets (and - * perhaps only at these offsets to get better compression ratio). + * that the decompressor will only need to seek to certain uncompressed + * positions, it can be a good idea to start a new Block at (some of) these + * positions (and only at these positions to get better compression ratio). *

* liblzma in XZ Utils supports starting a new Block with * LZMA_FULL_FLUSH. XZ Utils 5.1.1alpha added threaded * compression which creates multi-Block .xz files. XZ Utils 5.1.1alpha * also added the option --block-size=SIZE to the xz command - * line tool. + * line tool. XZ Utils 5.1.2alpha added a partial implementation of + * --block-list=SIZES which allows specifying sizes of + * individual Blocks. * * @see SeekableFileInputStream * @see XZInputStream @@ -580,7 +582,7 @@ public class SeekableXZInputStream extends SeekableInputStream { } /** - * Gets the uncompressed position in this input stream. + * Gets the current uncompressed position in this input stream. * * @throws XZIOException if the stream has been closed */ -- cgit v1.2.3