-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add disableGzipContent option for create from InputStream #7057
Add disableGzipContent option for create from InputStream #7057
Conversation
Previously, only the methods to create blobs that take a byte[] argument offer the option to disable gzip compression; the methods that accept an InputStream argument do not. This is due to the BlobWriteOption enum missing a matching constant for BlobTargetOption.IF_DISABLE_GZIP_CONTENT. This change set adds a matching IF_DISABLE_GZIP_CONTENT constant to BlobWriteOption including the correct translation to StorageRpc.Option. The net result is that the Storage create functions that accept an InputStream now offer the option to disable gzip compression.
Codecov Report
@@ Coverage Diff @@
## master #7057 +/- ##
============================================
- Coverage 32.18% 32.18% -0.01%
+ Complexity 3698 3697 -1
============================================
Files 249 249
Lines 40371 40373 +2
Branches 6134 6134
============================================
Hits 12994 12994
- Misses 26304 26305 +1
- Partials 1073 1074 +1
Continue to review full report at Codecov.
|
@@ -699,6 +700,10 @@ public static BlobWriteOption kmsKeyName(String kmsKeyName) { | |||
public static BlobWriteOption userProject(String userProject) { | |||
return new BlobWriteOption(Option.USER_PROJECT, userProject); | |||
} | |||
|
|||
public static BlobWriteOption disableGzipContent() { |
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.
Is a javadoc desired here? If so, what do you think of the text:
Returns an option that signals automatic gzip compression should not be performed en route to the bucket.
closing this PR as it's already merged in respective repo. |
Previously, only the methods to create blobs that take a
byte[]
argument offer the option to disable gzip compression; the methods that accept anInputStream
argument do not. This is due to theBlobWriteOption
enum missing a matching constant forBlobTargetOption.IF_DISABLE_GZIP_CONTENT
.This change set adds a matching
IF_DISABLE_GZIP_CONTENT
constant toBlobWriteOption
including the correct translation to StorageRpc.Option. The net result is that the Storage create functions that accept an InputStream now offer the option to disable gzip compression.Fixes #7056.