mirror of
https://github.com/google/brotli.git
synced 2026-09-22 06:35:52 +00:00
Version 0.5.0 expands buffers on OSX #119
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hashbackup on GitHub (Jun 22, 2016).
I'm trying to get Brotli integrated into the backup program I'm developing, HashBackup. Previously I had been testing with a version downloaded May 18th, and it worked fine on OSX and Linux.
I downloaded the latest version today for testing. Instead of compressing, it is apparently expanding. Any clues?
Here's a test with bro.py:
Here's a buffer test:
So it appears to be compressing into a temp buffer but not setting the length right. Probably a bug in python/brotlimodule.cc
@eustas commented on GitHub (Jun 22, 2016):
Going to investigate it tomorrow. Thanks for the heads-up!
@hashbackup commented on GitHub (Jun 22, 2016):
Found it: need to subtract available_out:
While you're in there, you might want to bracket your compression, decompression, and string copies with Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS.