blob: 03b1b792dc59400e552e8434583064d6655f5b47 [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
Denis Vlasenkoa60936d2008-06-28 05:04:09 +000012char FAST_FUNC get_header_tar_lzma(archive_handle_t *archive_handle)
Rob Landleyc1d69902006-01-20 18:28:50 +000013{
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 Vlasenkob6052722008-07-10 17:43:01 +000017 open_transformer(archive_handle->src_fd, unpack_lzma_stream, "unlzma");
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}