blob: cf73824e36c7a7d557ddd708054a845b021cff64 [file] [log] [blame]
"Robert P. J. Day"63fc1a92006-07-02 19:47:05 +00001/* vi: set sw=4 ts=4: */
Rob Landleyc1d69902006-01-20 18:28:50 +00002/*
3 * Small lzma deflate implementation.
4 * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org>
5 *
6 * Licensed under GPL v2, see file LICENSE in this tarball for details.
7 */
8
Denis Vlasenko9a7d38f2007-05-31 22:42:12 +00009#include "libbb.h"
Rob Landleyc1d69902006-01-20 18:28:50 +000010#include "unarchive.h"
11
12char get_header_tar_lzma(archive_handle_t * archive_handle)
13{
14 /* Can't lseek over pipes */
Denis Vlasenko13858992006-10-08 12:49:22 +000015 archive_handle->seek = seek_by_read;
Rob Landleyc1d69902006-01-20 18:28:50 +000016
Denis Vlasenko211f7f82007-09-05 11:48:32 +000017 archive_handle->src_fd = open_transformer(archive_handle->src_fd, unpack_lzma_stream, "unlzma", "unlzma", "-cf", "-", NULL);
Rob Landleyc1d69902006-01-20 18:28:50 +000018 archive_handle->offset = 0;
Denis Vlasenko476b0702007-09-09 14:11:11 +000019 while (get_header_tar(archive_handle) == EXIT_SUCCESS)
20 continue;
Rob Landleyc1d69902006-01-20 18:28:50 +000021
22 /* Can only do one file at a time */
23 return EXIT_FAILURE;
24}