There's a corner case that can cause the final character to be wrong when uncompressing the compressed file.
If the last character written to the compressed file is 0, then when uncompressing that character it's impossible to know how many 0 bits made up that last byte.