Skip to content

Decompress chunks of streamed content from KeyValueStoreClient.stream_record if it had Content-Encoding: gzip header #434

@Pijukatel

Description

@Pijukatel

Currently, when you use KeyValueStoreClient.stream_record, the client silently adds Accept-Encoding: gzip, deflate, br header to the API call, and the server starts streaming a compressed file. But the client is not decompressing the chunks and is yielding the chunks of the compressed file. This can be very surprising to users, as in the end they will get a compressed file even though it was not compressed in the storage. It was compressed only for transport, and so the client should handle the decompression.

Proposal:
Maybe we can use zlib and decompress the streamed chunks on the fly and yield only the decompressed data so that the user does not have to handle such internals.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions