@Override
	public void unpackToFolder(File file, File folder) {
		try {
			folder.mkdir();
			int[] gzipHeader = { 0x00, 0x00, 0x00, 0x00, 0x1F, 0x8B };
			FileInputStream fis = new FileInputStream(file);
			FileOutputStream fosHeader = new FileOutputStream(new File(folder,"bootloader"));
			FileOutputStream fosGZip = new FileOutputStream(new File(folder,"linuxkernel.gz"));
			int nbFound = 0;
			while(true) {
				int val = fis.read();
				if(val == -1)
					break;
				if(val == gzipHeader[nbFound]) {
					nbFound++;
					if(nbFound == 6)
						break;
					continue;
				} else {
					if(nbFound != 0) {
						for(int i=0; i<nbFound; i++)
							fosHeader.write(gzipHeader[i]);
						nbFound = 0;
					}
					fosHeader.write(val);
				}
			}
			fosGZip.write(0x1F);
			fosGZip.write(0x8B);
			byte[] buffer = new byte[1024];
			while(true) {
				int nb = fis.read(buffer);
				if(nb == -1)
					break;
				fosGZip.write(buffer,0,nb);
			}
			fosGZip.close();
			fosHeader.close();
		} catch(Exception ex) {
			throw new RuntimeException(ex);
		}
	}