diff --git a/commons/src/main/java/org/archive/io/GenericReplayCharSequence.java b/commons/src/main/java/org/archive/io/GenericReplayCharSequence.java index 66c95bba..e178b588 100644 --- a/commons/src/main/java/org/archive/io/GenericReplayCharSequence.java +++ b/commons/src/main/java/org/archive/io/GenericReplayCharSequence.java @@ -39,9 +39,9 @@ import java.util.logging.Logger; * buffer and overflow backing file) that can handle streams of multibyte * characters. * - * If possible, use {@link Latin1ByteReplayCharSequence}. It performs better even - * for the single byte case (Decoding is an expensive process). - * + * For better performance on ISO-8859-1 text, use + * {@link Latin1ByteReplayCharSequence}. + * *

Call close on this class when done so can clean up resources. * *

Implementation currently works by checking to see if content to read diff --git a/commons/src/main/java/org/archive/io/Latin1ByteReplayCharSequence.java b/commons/src/main/java/org/archive/io/Latin1ByteReplayCharSequence.java index 16c26afd..4742572b 100644 --- a/commons/src/main/java/org/archive/io/Latin1ByteReplayCharSequence.java +++ b/commons/src/main/java/org/archive/io/Latin1ByteReplayCharSequence.java @@ -33,7 +33,9 @@ import org.archive.util.DevUtils; * Provides a (Replay)CharSequence view on recorded stream bytes (a prefix * buffer and overflow backing file). * - * Treats the byte stream as 8-bit. + * Assumes the byte stream is ISO-8859-1 text, taking advantage of the fact + * that each byte in the stream corresponds to a single unicode character with + * the same numerical value as the byte. * *

Uses a wraparound rolling buffer of the last windowSize bytes read * from disk in memory; as long as the 'random access' of a CharSequence