Split a long string
This commit is contained in:
parent
121b157dc7
commit
b8ab746a9d
|
@ -218,7 +218,8 @@ public class SnappyTest
|
||||||
@Test
|
@Test
|
||||||
public void simpleUsage() throws Exception {
|
public void simpleUsage() throws Exception {
|
||||||
|
|
||||||
String input = "Hello snappy-java! Snappy-java is a JNI-based wrapper for using Snappy from Google (written in C++), a fast compresser/decompresser.";
|
String input = "Hello snappy-java! Snappy-java is a JNI-based wrapper"
|
||||||
|
+ " for using Snappy from Google (written in C++), a fast compresser/decompresser.";
|
||||||
byte[] compressed = Snappy.compress(input.getBytes("UTF-8"));
|
byte[] compressed = Snappy.compress(input.getBytes("UTF-8"));
|
||||||
byte[] uncompressed = Snappy.uncompress(compressed);
|
byte[] uncompressed = Snappy.uncompress(compressed);
|
||||||
String result = new String(uncompressed, "UTF-8");
|
String result = new String(uncompressed, "UTF-8");
|
||||||
|
|
Loading…
Reference in New Issue