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

Google Cloud Transparent GZIP Compression Support #104

Merged
merged 26 commits into from
Sep 19, 2023

Conversation

vitaminmoo
Copy link
Member

@vitaminmoo vitaminmoo commented Aug 23, 2023

Support gzip compression for localfs and Google Storage

This is configured such that compressed files are subject to decompressive transcoding according to https://cloud.google.com/storage/docs/transcoding - If you don't actively try, readers of these files will get the decompressed version. We download the compressed version to optimize transfer bandwidth.

@vitaminmoo vitaminmoo force-pushed the transparent-snappy-compression branch from f70df44 to 6b55a6b Compare August 29, 2023 23:02
@vitaminmoo vitaminmoo changed the title Initial commit of PoC of transparent snappy compression Initial commit of PoC of transparent gzip compression Sep 7, 2023
@vitaminmoo vitaminmoo marked this pull request as ready for review September 7, 2023 18:29
@vitaminmoo vitaminmoo changed the title Initial commit of PoC of transparent gzip compression Google Cloud Transparent GZIP Compression Support Sep 18, 2023
Copy link
Contributor

@epsniff epsniff left a comment

Choose a reason for hiding this comment

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

Looks great and a little more modern.

@@ -13,8 +14,9 @@ func TestReaderContextDone(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
cancel()

m := memRWC([]byte("some-data"))
rc := NewReader(ctx, &m)
pr, pw := bufpipe.New([]byte("some-data"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice

if len(o.metadata) == 0 {
o.metadata = make(map[string]string)
}

_, err = io.Copy(storecopy, cachedcopy)
if err != nil {
return err
}

Copy link
Contributor

Choose a reason for hiding this comment

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

LoL, past me sucked at programming...

@vitaminmoo vitaminmoo merged commit 26225d7 into master Sep 19, 2023
@vitaminmoo vitaminmoo deleted the transparent-snappy-compression branch September 19, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants