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

feat(fsa): decompress "json.gz" files automatically with readJson #1345

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

blacha
Copy link
Owner

@blacha blacha commented Nov 8, 2023

Motivation

I have a number of files stored in s3 that are either Content-Encoding: gzip or .json.gz I would prefer not having to detect that they are Content-Encoding: gzip in all my scripts

Modification

readJson will now automatically decompress files ending with .gz

Before this would throw a error now it will return the object.

const obj = await fsa.readJson(new URL("s3://foo/bar.json.gz"))

@blacha blacha marked this pull request as ready for review November 8, 2023 01:13
@kodiakhq kodiakhq bot merged commit a13e380 into master Nov 8, 2023
4 checks passed
@kodiakhq kodiakhq bot deleted the feat/gunzip-read-json branch November 8, 2023 01:37
@github-actions github-actions bot mentioned this pull request Nov 8, 2023
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.

1 participant