UUE files handling

22 views
Skip to first unread message

clas...@gmail.com

unread,
Dec 11, 2018, 10:10:08 AM12/11/18
to libarchive-discuss
I encoded a docx file with uuencode and when I extract it with libarchive it extracts not just the docx from the uue but it also extracts everything from the docx, when compressing docx with zip it knows to only extract docx from the zip file and doesn't try to extract the docx.

How can I get the same behavior with uue?

Tim Kientzle

unread,
Dec 15, 2018, 1:57:43 PM12/15/18
to clas...@gmail.com, libarchiv...@googlegroups.com
You've probably called

archive_read_support_format_all()

at some point in your setup. This enables Zip extraction. If you don't want Zip extraction, don't call this.

Instead, you probably want:

archive_read_support_format_raw()


Cheers,

Tim

Caveat: Don't enable "raw" and other formats at the same time without carefully considering the implications. In particular, if you might ever try to read damaged or malformed data, this will change how errors get handled.


> On Dec 11, 2018, at 7:10 AM, clas...@gmail.com wrote:
>
> I encoded a docx file with uuencode and when I extract it with libarchive it extracts not just the docx from the uue but it also extracts everything from the docx, when compressing docx with zip it knows to only extract docx from the zip file and doesn't try to extract the docx.
>
> How can I get the same behavior with uue?
>
> --
> You received this message because you are subscribed to the Google Groups "libarchive-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to libarchive-disc...@googlegroups.com.
> To post to this group, send email to libarchiv...@googlegroups.com.
> Visit this group at https://groups.google.com/group/libarchive-discuss.
> For more options, visit https://groups.google.com/d/optout.

clas...@gmail.com

unread,
Dec 17, 2018, 2:34:59 AM12/17/18
to libarchive-discuss
Yes I did but I do want to support zip extraction as well.
I just don't want docx to be extracted (same as happens when I put docx into zip file)


On Saturday, December 15, 2018 at 8:57:43 PM UTC+2, Tim Kientzle wrote:
You've probably called

  archive_read_support_format_all()

at some point in your setup.  This enables Zip extraction.  If you don't want Zip extraction, don't call this.

Instead, you probably want:

  archive_read_support_format_raw()


Cheers,

Tim

Caveat:  Don't enable "raw" and other formats at the same time without carefully considering the implications.  In particular, if you might ever try to read damaged or malformed data, this will change how errors get handled.


> On Dec 11, 2018, at 7:10 AM, clas...@gmail.com wrote:
>
> I encoded a docx file with uuencode and when I extract it with libarchive it extracts not just the docx from the uue but it also extracts everything from the docx, when compressing docx with zip it knows to only extract docx from the zip file and doesn't try to extract the docx.
>
> How can I get the same behavior with uue?
>
> --
> You received this message because you are subscribed to the Google Groups "libarchive-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to libarchive-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages