aboutsummaryrefslogtreecommitdiff
path: root/lib/libarchive/archive_read_support_compression_program.c
Commit message (Collapse)AuthorAgeFilesLines
* Use contrib sources for building libarchive, tar and cpio.Martin Matuska2011-12-221-459/+0
| | | | | | | | | Make "make test" fully operational. MFC after: 2 weeks Notes: svn path=/head/; revision=228797
* Portability.Tim Kientzle2009-12-281-1/+3
| | | | Notes: svn path=/head/; revision=201112
* Merge from libarchive.googlecode.com r791, r879, r884, r948: VariousTim Kientzle2009-04-121-16/+83
| | | | | | | | | fixes to read_support_compression_program. In particular, failure of the external program is detected a lot earlier, which gives much more reasonable error handling. Notes: svn path=/head/; revision=190961
* Merge from libarchive.googlecode.com: Mostly a bunch ofTim Kientzle2009-04-121-1/+1
| | | | | | | | | | | | | | | | corrections to the Windows support to reconcile differences between Visual Studio and Cygwin. Includes parts of revisions 757, 774, 787, 815, 817, 819, 820, 844, and 886. Of particular note, r886 overhauled the UTF-8/Unicode conversions to work correctly regardless of whether the local system uses 16-bit or 32-bit wchar_t. (I assume that systems with 16-bit wchar_t use UTF-16 and those with 32-bit wchar_t use UCS-4.) This revision also added a preference for wcrtomb() (which is thread-safe) on platforms that support it. Notes: svn path=/head/; revision=190959
* Merge r550,584,587,609,647,674 from libarchive.googlecode.com:Tim Kientzle2009-03-071-119/+163
| | | | | | | | | | | | | | | Refactor the read_compression_program to add two new abilities: * Public API: You can now include a signature string when you register a program; the program will run only on input that matches the signature string. * Internal API: You can use the init() function to instantiate an external program as part of a filter pipeline. This can be used for graceful fallback (if zlib is unavailable, use external gzip instead) and to use external programs with bidders that are more sophisticated than a static signature check. Notes: svn path=/head/; revision=189476
* Merge r491,493,500,507,510,530,543 from libarchive.googlecode.com:Tim Kientzle2009-03-061-0/+1
| | | | | | | | This implements the new generic options framework that provides a way to override format- and compression-specific parameters. Notes: svn path=/head/; revision=189438
* Merge r398 from libarchive.googlecode.com: Check that bidderTim Kientzle2009-03-061-3/+3
| | | | | | | object was allocated before we try to use it. Notes: svn path=/head/; revision=189428
* Merge r364, r378, r379, r393, and r539 from libarchive.googlecode.com:Tim Kientzle2009-03-051-67/+54
| | | | | | | | | | | | | | | | | | | This is the last phase of the "big decompression refactor" that puts a lazy reblocking layer between each pair of read filters. I've also changed the terminology for this area---the two kinds of objects are now called "read filters" and "read filter bidders"---and moved ownership of these objects to the archive_read core. This greatly simplifies implementing new read filters, which can now use peek/consume I/O semantics both for bidding (arbitrary look-ahead!) and for reading streams (look-ahead simplifies handling concatenated streams, for instance). The first merge here is the overhaul proper; the remainder are small fixes to correct errors in the initial implementation. Notes: svn path=/head/; revision=189389
* MfP4: Big read filter refactoring.Tim Kientzle2008-12-061-102/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | This is an attempt to eliminate a lot of redundant code from the read ("decompression") filters by changing them to juggle arbitrary-sized blocks and consolidate reblocking code at a single point in archive_read.c. Along the way, I've changed the internal read/consume API used by the format handlers to a slightly different style originally suggested by des@. It does seem to simplify a lot of common cases. The most dramatic change is, of course, to archive_read_support_compression_none(), which has just evaporated into a no-op as the blocking code this used to hold has all been moved up a level. There's at least one more big round of refactoring yet to come before the individual filters are as straightforward as I think they should be... Notes: svn path=/head/; revision=185679
* Windows compatibility: The stub replacement for compression_programTim Kientzle2008-09-121-0/+2
| | | | | | | (which always returns an error when invoked) needs its prototype. Notes: svn path=/head/; revision=182953
* A number of minor corrections to the support for external compressionTim Kientzle2008-06-151-2/+9
| | | | | | | | | programs: * Support platforms that have fork() but not vfork() * Don't write(), select(), or poll() against closed file descriptors Notes: svn path=/head/; revision=179800
* MFp4: libarchive 2.5.4b. (Still 'b' until I get a bit moreTim Kientzle2008-05-261-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | feedback, but the 2.5 branch is shaping up nicely.) In addition to many small bug fixes and code improvements: * Another iteration of versioning; I think I've got it right now. * Portability: A lot of progress on Windows support (though I'm not committing all of the Windows support files to FreeBSD CVS) * Explicit tracking of MBS, WCS, and UTF-8 versions of strings in archive_entry; the archive_entry routines now correctly return NULL only when something is unset, setting NULL properly clears string values. Most charset conversions have been pushed down to archive_string. * Better handling of charset conversion failure when writing or reading UTF-8 headers in pax archives * archive_entry_linkify() provides multiple strategies for hardlink matching to suit different format expectations * More accurate bzip2 format detection * Joerg Sonnenberger's extensive improvements to mtree support * Rough support for self-extracting ZIP archives. Not an ideal approach, but it works for the archives I've tried. * New "sparsify" option in archive_write_disk converts blocks of nulls into seeks. * Better default behavior for the test harness; it now reports all failures by default instead of coredumping at the first one. Notes: svn path=/head/; revision=179321
* Fix a strict aliasing warning from GCC 4.1.Tim Kientzle2007-07-201-1/+4
| | | | | | | | | Thanks to: Joerg Sonnenberger Approved by: re (hrs) MFC after: 3 days Notes: svn path=/head/; revision=171512
* libarchive 2.2.3Tim Kientzle2007-05-291-0/+312
* "compression_program" support uses an external program * Portability: no longer uses "struct stat" as a primary data interchange structure internally * Part of the above: refactor archive_entry to separate out copy_stat() and stat() functions * More complete tests for archive_entry * Finish archive_entry_clone() * Isolate major()/minor()/makedev() in archive_entry; remove these from everywhere else. * Bug fix: properly handle decompression look-ahead at end-of-data * Bug fixes to 'ar' support * Fix memory leak in ZIP reader * Portability: better timegm() emulation in iso9660 reader * New write_disk flags to suppress auto dir creation and not overwrite newer files (for future cpio front-end) * Simplify trailing-'/' fixup when writing tar and pax * Test enhancements: fix various compiler warnings, improve portability, add lots of new tests. * Documentation: document new functions, first draft of libarchive_internals.3 MFC after: 14 days Thanks to: Joerg Sonnenberger (compression_program) Thanks to: Kai Wang (ar) Thanks to: Colin Percival (many small fixes) Thanks to: Many others who sent me various patches and problem reports. Notes: svn path=/head/; revision=170079