@Test
	public void testSnzInputStream() throws IOException, InterruptedException {

		File tmpDirectory = TestUtil.directoriesToFile("tmp", "SnzInputStreamTest");
		
		TestUtil.copyRecursive(testdataDirectory, tmpDirectory);
		
		ProcessBuilder pb = new ProcessBuilder(snzipExecutable, "*");
		pb.directory(tmpDirectory);
		pb.redirectErrorStream(true);
		Process p = pb.start();

		TestUtil.pipe(p.getInputStream(),  System.out);
		int snzReturnCode = p.waitFor();
		if(snzReturnCode != 0) {
			Assert.fail("snzip exited with return code " + snzReturnCode);
		}
		
		for(File org : testdataDirectory.listFiles()) {
			if(org.isFile()) {
				System.out.println("comparing " + org.getName());
				byte[] originalData = TestUtil.readFully(org);
				ByteArrayOutputStream decompressedData = new ByteArrayOutputStream();
				SnzInputStream sis = new SnzInputStream(new FileInputStream(new File(tmpDirectory, org.getName() + ".snz")));
				TestUtil.pipe(sis, decompressedData);
				sis.close();
				Assert.assertArrayEquals(originalData, decompressedData.toByteArray());
			}
		}
	}