Skip to content

using DECOMPRESSORS when globally defined#56

Open
kkdd wants to merge 4 commits intomakinacorpus:masterfrom
kkdd:master
Open

using DECOMPRESSORS when globally defined#56
kkdd wants to merge 4 commits intomakinacorpus:masterfrom
kkdd:master

Conversation

@kkdd
Copy link
Contributor

@kkdd kkdd commented Feb 24, 2018

as defined in decompressor.js:

var DECOMPRESSORS = {
    gz: function (x) {return gzip.decompress(x);},
};

@kkdd
Copy link
Contributor Author

kkdd commented Feb 24, 2018

It has been a long homework. Is this acceptable?

@mabhub mabhub requested a review from leplatrem March 1, 2018 16:41
ext = name.pop();
decompressor = this._decompressors[ext];
if (decompressor) {
ext = name.pop();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this always true? You are assuming that the file will data.geojson.zip

var result = e.target.result;
if (parser.decompressor) {
result = parser.decompressor(result);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

couldn't we include the decompression in the parser.processor function if a decompressor is defined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants