Permalink
Browse files

* Fix SnappyFramedCompressor to follow the standard x-snappy-framed

specification.
* Update CHANGELOG and prepare for 7.0.0 release

RB=777249
BUG=ESRE-4260
G=si-dev
R=ssheng,dhoa,cxu
A=dhoa
  • Loading branch information...
1 parent b058e5a commit 1660ca7083ba873d739cd49e2af21beca6037cc1 Ang Xu committed Jul 29, 2016
View
@@ -1,5 +1,8 @@
-6.1.3
+7.0.0
-----
+(RB=777249)
+Fix SnappyFramedCompressor to follow the standard x-snappy-framed
+specification.
6.1.2
-----
View
@@ -70,7 +70,7 @@ project.ext.externalDependency = [
'servletApi': 'javax.servlet:javax.servlet-api:3.1.0',
'slf4jApi': 'org.slf4j:slf4j-api:1.6.2',
'slf4jLog4j2': 'org.apache.logging.log4j:log4j-slf4j-impl:2.0.2',
- 'snappy': 'org.iq80.snappy:snappy:0.3',
+ 'snappy': 'org.iq80.snappy:snappy:0.4',
'testng': 'org.testng:testng:6.9.9',
'velocity': 'org.apache.velocity:velocity:1.5',
'zero_allocation_hashing': 'net.openhft:zero-allocation-hashing:0.4',
View
@@ -1,4 +1,4 @@
-version=6.1.1
+version=7.0.0
sonatypeUsername=please_set_in_home_dir_if_uploading_to_maven_central
sonatypePassword=please_set_in_home_dir_if_uploading_to_maven_central
@@ -4,9 +4,8 @@
import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.io.IOUtils;
-import org.iq80.snappy.Snappy;
-import org.iq80.snappy.SnappyInputStream;
-import org.iq80.snappy.SnappyOutputStream;
+import org.iq80.snappy.SnappyFramedInputStream;
+import org.iq80.snappy.SnappyFramedOutputStream;
/**
@@ -28,7 +27,7 @@ public String getContentEncodingName()
public byte[] inflate(InputStream data) throws CompressionException
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
- try (SnappyInputStream snappy = new SnappyInputStream(data))
+ try (SnappyFramedInputStream snappy = new SnappyFramedInputStream(data, true))
{
IOUtils.copy(snappy, out);
}
@@ -43,7 +42,7 @@ public String getContentEncodingName()
public byte[] deflate(InputStream data) throws CompressionException
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
- try (SnappyOutputStream snappy = new SnappyOutputStream(out))
+ try (SnappyFramedOutputStream snappy = new SnappyFramedOutputStream(out))
{
IOUtils.copy(data, snappy);
}
@@ -21,8 +21,8 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.util.concurrent.Executor;
-import org.iq80.snappy.SnappyInputStream;
-import org.iq80.snappy.SnappyOutputStream;
+import org.iq80.snappy.SnappyFramedInputStream;
+import org.iq80.snappy.SnappyFramedOutputStream;
/**
@@ -51,7 +51,7 @@ protected StreamingInflater createInflater(EntityStream underlying)
@Override
protected InputStream createInputStream(InputStream in) throws IOException
{
- return new SnappyInputStream(in);
+ return new SnappyFramedInputStream(in, true);
}
};
}
@@ -64,7 +64,7 @@ protected StreamingDeflater createDeflater(EntityStream underlying)
@Override
protected OutputStream createOutputStream(OutputStream out) throws IOException
{
- return new SnappyOutputStream(out);
+ return new SnappyFramedOutputStream(out);
}
};
}
@@ -41,7 +41,7 @@
import java.util.zip.GZIPOutputStream;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
import org.apache.commons.io.IOUtils;
-import org.iq80.snappy.SnappyOutputStream;
+import org.iq80.snappy.SnappyFramedOutputStream;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
@@ -77,7 +77,7 @@ public void testSnappyCompressor()
Arrays.fill(origin, (byte)'a');
ByteArrayOutputStream out = new ByteArrayOutputStream();
- SnappyOutputStream snappy = new SnappyOutputStream(out);
+ SnappyFramedOutputStream snappy = new SnappyFramedOutputStream(out);
IOUtils.write(origin, snappy);
snappy.close();
byte[] compressed = out.toByteArray();
@@ -41,7 +41,7 @@
import java.util.zip.GZIPOutputStream;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
import org.apache.commons.io.IOUtils;
-import org.iq80.snappy.SnappyOutputStream;
+import org.iq80.snappy.SnappyFramedOutputStream;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
@@ -77,7 +77,7 @@ public void testSnappyCompressor()
Arrays.fill(origin, (byte)'a');
ByteArrayOutputStream out = new ByteArrayOutputStream();
- SnappyOutputStream snappy = new SnappyOutputStream(out);
+ SnappyFramedOutputStream snappy = new SnappyFramedOutputStream(out);
IOUtils.write(origin, snappy);
snappy.close();
byte[] compressed = out.toByteArray();

0 comments on commit 1660ca7

Please sign in to comment.