Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi member / bgzip compatibility #145

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added test/fixtures/bgzip-1.txt.gz
Binary file not shown.
Binary file added test/fixtures/bgzip-2.txt.gz
Binary file not shown.
13 changes: 13 additions & 0 deletions test/gzip_specials.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,17 @@ describe('Gzip special cases', function () {
assert.deepEqual(inflator.result, expectedDataArray, 'inflator produced expected data');
});

it('Read bgzipped file 1', function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be more convenient if all 3 tests will have similar names and fixtures:

  • "Read streamed file 1" + "streamed_gzip_java.txt.gz
  • "Read streamed file 2" + "streamed_bgzip_1.txt.gz
  • "Read streamed file 3" + "streamed_bgzip_2.txt.gz

var data = fs.readFileSync(path.join(__dirname, 'fixtures/bgzip-1.txt.gz'));
var result = pako.inflate(data);

assert.equal(result.length, 65569);
});

it('Read bgzipped file 2', function () {
var data = fs.readFileSync(path.join(__dirname, 'fixtures/bgzip-2.txt.gz'));
var result = pako.inflate(data);

assert.equal(result.length, 1922918);
});
});