changeset 33:565ce0835674

TODO added, to try stream for unzip in revlog
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 13 Jan 2011 03:42:14 +0100
parents 42585c7cd641
children 51bc56c0addd
files design.txt src/com/tmate/hgkit/console/Incoming.java src/com/tmate/hgkit/ll/RevlogStream.java
diffstat 3 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/design.txt	Thu Jan 13 03:41:10 2011 +0100
+++ b/design.txt	Thu Jan 13 03:42:14 2011 +0100
@@ -36,6 +36,7 @@
 delta merge
 Changeset to get index (local revision number)
 RevisionWalker (on manifest) and WorkingCopyWalker (io.File) talking to ? and/or dirstate 
+RevlogStream - Inflater. Perhaps, InflaterStream instead?
  
 Status operation from GUI - guess, usually on a file/subfolder, hence API should allow for starting path (unlike cmdline, seems useless to implement include/exclide patterns - GUI users hardly enter them, ever)
 
--- a/src/com/tmate/hgkit/console/Incoming.java	Thu Jan 13 03:41:10 2011 +0100
+++ b/src/com/tmate/hgkit/console/Incoming.java	Thu Jan 13 03:42:14 2011 +0100
@@ -123,6 +123,7 @@
 				System.out.println(n);
 			}
 		}
+		
 	}
 
 	static final class RemoteBranch {
--- a/src/com/tmate/hgkit/ll/RevlogStream.java	Thu Jan 13 03:41:10 2011 +0100
+++ b/src/com/tmate/hgkit/ll/RevlogStream.java	Thu Jan 13 03:42:14 2011 +0100
@@ -165,7 +165,7 @@
 					}
 					if (dataBuf[0] == 0x78 /* 'x' */) {
 						try {
-							Inflater zlib = new Inflater();
+							Inflater zlib = new Inflater(); // XXX Consider reuse of Inflater, and/or stream alternative
 							zlib.setInput(dataBuf, 0, compressedLen);
 							byte[] result = new byte[actualLen*2]; // FIXME need to use zlib.finished() instead 
 							int resultLen = zlib.inflate(result);