mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
update tests, is not completed yet :)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import org.xerial.snappy.SnappyInputStream;
|
||||
import net.lingala.zip4j.model.LocalFileHeader;
|
||||
|
||||
public class SnappyHandler {
|
||||
public static void SnappyZipInputStream(InputStream inputStream) throws IOException {
|
||||
int readLen;
|
||||
byte[] readBuffer = new byte[4096];
|
||||
try (SnappyInputStream zipInputStream = new SnappyInputStream(inputStream)) {
|
||||
try (OutputStream outputStream = Files.newOutputStream(Paths.get("extractedFile"))) {
|
||||
while ((readLen = zipInputStream.read(readBuffer)) != -1) {
|
||||
outputStream.write(readBuffer, 0, readLen);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user