Merge with master
This commit is contained in:
commit
f6cc4e2b9c
|
@ -38,8 +38,9 @@
|
||||||
var contents = uint8ToString(data);
|
var contents = uint8ToString(data);
|
||||||
console.log(header.fileName, contents);
|
console.log(header.fileName, contents);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
base64 = utils.uint8ToBase64(out);
|
base64 = btoa(uint8ToString(out));
|
||||||
|
|
||||||
url = "data:application/tar;base64," + base64;
|
url = "data:application/tar;base64," + base64;
|
||||||
window.open(url);
|
window.open(url);
|
||||||
|
|
|
@ -56,8 +56,8 @@
|
||||||
checksum: ' ',
|
checksum: ' ',
|
||||||
type: '0', // just a file
|
type: '0', // just a file
|
||||||
ustar: 'ustar ',
|
ustar: 'ustar ',
|
||||||
owner: '',
|
owner: opts.owner || '',
|
||||||
group: ''
|
group: opts.group || ''
|
||||||
};
|
};
|
||||||
|
|
||||||
// calculate the checksum
|
// calculate the checksum
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
this.out.set(input, this.written);
|
this.out.set(input, this.written);
|
||||||
|
|
||||||
// to the nearest multiple of recordSize
|
// to the nearest multiple of recordSize
|
||||||
this.written += input.length + (recordSize - (input.length % recordSize));
|
this.written += input.length + (recordSize - (input.length % recordSize || recordSize));
|
||||||
|
|
||||||
// make sure there's at least 2 empty records worth of extra space
|
// make sure there's at least 2 empty records worth of extra space
|
||||||
if (this.out.length - this.written < recordSize * 2) {
|
if (this.out.length - this.written < recordSize * 2) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "tar-js",
|
"name": "tar-js",
|
||||||
"description": "Tar implemented in the browser",
|
"description": "Tar implemented in the browser",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"homepage": "http://github.com/beatgammit/tar-js",
|
"homepage": "http://github.com/beatgammit/tar-js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Loading…
Reference in a new issue