The ASCII85 decoder currently throws a ValueError when it encounters a space, rather than ignoring the character. This appears to be incorrect behavior, and is reinforced by an existing invalidity test that excludes several whitespace characters from the test (though their validity was not also tested).
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.
The ASCII85 decoder currently throws a ValueError when it encounters a space, rather than ignoring the character. This appears to be incorrect behavior, and is reinforced by an existing invalidity test that excludes several whitespace characters from the test (though their validity was not also tested).
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.