Enforce forward progress with StreamCodec
authorStella Lau <laus@fb.com>
Fri, 25 Aug 2017 16:23:46 +0000 (09:23 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 25 Aug 2017 16:34:57 +0000 (09:34 -0700)
commit91022bb0ee7086fead232194a89f3988acea9612
treeda8b130636d7743e3f4190650532bb4fba29f1ef
parent82ee3be4b83964e8476315efa5817c2c41050f22
Enforce forward progress with StreamCodec

Summary:
- Throw exception if no forward progress was made with `StreamCodec.compress()` and `StreamCodec.uncompress()`
- Prevents infinite looping behavior when no forward progress was made
- Update tests

Reviewed By: terrelln

Differential Revision: D5685690

fbshipit-source-id: 969393896b74f51250f0e0ce3af0cd4fedcab49a
folly/io/Compression.cpp
folly/io/Compression.h
folly/io/test/CompressionTest.cpp