libarchive icon indicating copy to clipboard operation
libarchive copied to clipboard

Add constant for base 64 encoded filter

Open jimhester opened this issue 8 years ago • 2 comments

I needed to modify the whitespace to properly align the columns. If you would prefer I do that in a separate commit let me know.

There don't seem to be any current tests for archive_write_add_filter(), so I did not add a test for this change.

jimhester avatar Apr 27 '17 17:04 jimhester

That constant is also used to identify the format when reading an archive. So if we really want to distinguish uu format from base64 format, then we should also update:

https://github.com/libarchive/libarchive/blob/master/libarchive/archive_read_append_filter.c#L80

and

https://github.com/libarchive/libarchive/blob/master/libarchive/archive_write_add_filter_b64encode.c#L101

and we would also want to set the detected format appropriately here:

https://github.com/libarchive/libarchive/blob/master/libarchive/archive_read_support_filter_uu.c#L367

We should certainly add a test for archive_write_add_filter(), we can probably start by copying test_archive_write_add_filter_by_name.c. We should also update test_write_filter_b64encode.c to verify that the correct format code is being reflected in the write pipeline data that can be queried through archive_filter_code() and friends.

kientzle avatar Jul 29 '17 22:07 kientzle

I would just call it B64, similar to UU.

jsonn avatar Oct 07 '17 00:10 jsonn