Further write compression patch. (#253)

The existing code had a couple issues:
1) An EOF from the underlying uncompressed data would trigger finalizing
a read of the compressed data - even though the compressed data itself
wasn't ready or finalized reading.
2) *After* the `Close` call on the encoder, which triggers the
compressed data to be available for reading, is when you have to
actually read the final chunks and pieces of data.

The test code was also faulty as it checked the bytes up to the length
of the code compressed data (instead of the test compressed data), which
was 0.

This issue never arove on the fakes servers as cas_test doesn't seem to
have File tests - this compression issue wouldn't show up on in memory
blob tests. Just in case, I also added further checks on fake CAS to
ensure compressed calls were actually being made.
5 files changed
tree: 09ee2a39c40d2fc3d099b2b64fc61aed70dc7b4c
  1. .bazelci/
  2. .githooks/
  3. external/
  4. go/
  5. .gitignore
  6. AUTHORS
  7. BUILD.bazel
  8. check-gofmt.sh
  9. CONTRIBUTING.md
  10. CONTRIBUTORS
  11. go.mod
  12. go.sum
  13. LICENSE
  14. README.md
  15. remote-apis-sdks-deps.bzl
  16. setup-githooks.sh
  17. WORKSPACE
README.md

Remote Execution API SDKs

CI status: Build Status

PkgGoDev

This repository contains SDKs for the Remote Execution API.

See each language subdirectory's README.md for more specific instructions on using the SDK for that language.