Initial functionality of untar

+ Added skeleton "Tar" operation with no functionality
+ Added intial functionality of "Untar"
+ Added a function in `Utils` `HTMLFormat` to generalize HTML generation
of files and folders (could later be used in Unzip).

I had a brief search for a small library for tar and untar operations,
however they were mostly for node (if anyone finds one we can drop in
that would be appreciated) or unmaintained. Luckily the tar spec is
relatively easy to understand just from Wikipedia.
This commit is contained in:
toby 2017-02-08 00:05:52 -05:00
parent 35d74980a1
commit e809deb914
4 changed files with 191 additions and 1 deletions

View file

@ -2993,5 +2993,26 @@ var OperationConfig = {
value: MorseCode.WORD_DELIM_OPTIONS
}
]
},
"Tar": {
description: "Packs the input into a tarball.<br><br>No support for multiple files at this time.",
run: Compress.tar,
inputType: "byteArray",
outputType: "byteArray",
args: [
{
name: "Filename",
type: "string",
value: Compress.TAR_FILENAME
}
]
},
"Untar": {
description: "Unpacks a tarball and displays it per file.",
run: Compress.untar,
inputType: "byteArray",
outputType: "html",
args: [
]
}
};