-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
import format.tar.*;
import haxe.io.*;
using Lambda;
class Main {
static function main() {
function file(name:String, bytes:Bytes) return {
fileName: name,
fileSize: bytes.length,
fileTime: Date.now(),
fmod: 666,
uid: 1,
gid: 1,
uname: 'u',
gname: 'g',
data: bytes,
}
var data = [
file('folder/file1.txt', Bytes.alloc(4096)), // fails if: 1024, 2048, 4096, 512000, etc...
file('folder/file2.txt', Bytes.alloc(1)),
].list();
var output = new BytesOutput();
new Writer(output).write(data);
var entries = new Reader(new BytesInput(output.getBytes())).read();
for(file in entries) trace(file.fileName, file.fileSize);
}
}Trying to tar some files, if the first file size is of some magic numbers, it fails to untar with Invalid TAR end
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels