-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
f70df44
to
6b55a6b
Compare
There was a problem hiding this 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")) |
There was a problem hiding this comment.
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 | ||
} | ||
|
There was a problem hiding this comment.
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...
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.