claird / PyPDF4

A utility to read and write PDFs with Python
obsolete-https://pythonhosted.org/PyPDF2/
Other
330 stars 61 forks source link

ASCII85 decoder must strip the leading '<~' byte sequence #49

Closed kurtmckee closed 5 years ago

kurtmckee commented 5 years ago

If there is a leading <~ sequence at the start of the encoded data, the ASCII85 decoder must strip this data before attempting to decode the data.

This is important because once Python 2 support is dropped the implementation can simply use base64.a85encode(data, adobe=True), so matching this code now will help prepare PyPDF4 to drop Python 2 support.