Skip to content

Commit

Permalink
Fix the decompression in SR instrumented test for API 21
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusc83 committed Oct 23, 2024
1 parent ccbfe18 commit 3f7b09e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ internal abstract class BaseSessionReplayTest<R : Activity> {
val buf = ByteArray(1024)
val decompressor = Inflater()
decompressor.setInput(input, 0, input.size)
while (!decompressor.finished()) {
val resultLength = decompressor.inflate(buf)
bos.write(buf, 0, resultLength)
var uncompressedBytes = Int.MAX_VALUE
while (uncompressedBytes > 0) {
uncompressedBytes = decompressor.inflate(buf)
bos.write(buf, 0, uncompressedBytes)
}
decompressor.end()
return bos.toByteArray()
Expand Down

0 comments on commit 3f7b09e

Please sign in to comment.