# HG changeset patch # User sugi # Date 1415019129 -32400 # Node ID 99e309768ac9135346bd887c9f631b0df8b35f6c # Parent 4e7514007ae15997db62a4fc0828ab6c0b09e035 use zip method high cost. need improve diff -r 4e7514007ae1 -r 99e309768ac9 src/main/java/alice/datasegment/Command.java --- a/src/main/java/alice/datasegment/Command.java Mon Nov 03 20:26:41 2014 +0900 +++ b/src/main/java/alice/datasegment/Command.java Mon Nov 03 21:52:09 2014 +0900 @@ -96,15 +96,15 @@ } else { // rData is RAW ByteArray or already serialized data = (byte[]) rData.getObj(); serialized = rData.serialized(); - } - if (compressFlag) { + } + if (compressFlag) { data = zip(data); compressed = true; } } header = msg.write(new CommandMessage(type.id, index, seq, key, false, serialized, compressed)); - dataSize = msg.write(data.length); + dataSize = msg.write(data.length); buf = ByteBuffer.allocate(header.length+dataSize.length+data.length); buf.put(header); buf.put(dataSize); diff -r 4e7514007ae1 -r 99e309768ac9 src/main/java/alice/datasegment/ReceiveData.java --- a/src/main/java/alice/datasegment/ReceiveData.java Mon Nov 03 20:26:41 2014 +0900 +++ b/src/main/java/alice/datasegment/ReceiveData.java Mon Nov 03 21:52:09 2014 +0900 @@ -89,7 +89,6 @@ if (!byteArray) { return (T) val; } - byte[] b = null; if (compressed) { b = unzip((byte[]) val);