List of usage examples for org.apache.hadoop.io.compress.bzip2 CBZip2OutputStream write
@Override public void write(final int b) throws IOException
From source file:org.wikimedia.wikihadoop.TestStreamWikiDumpInputFormat.java
License:Apache License
private static byte[] bzip2(byte[] bytes, int bsize) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(); CBZip2OutputStream c = new CBZip2OutputStream(os, bsize); c.write(bytes); c.finish();/*from www. j a va 2 s . com*/ c.flush(); return os.toByteArray(); }