blob: da08e0c7256b9620171a6d93828400284813a426 [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 *
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02006 * Licensed under GPLv2, see file LICENSE in this source tree.
Rob Landleyc1d69902006-01-20 18:28:50 +00007 */
8
Denis Vlasenko9a7d38f2007-05-31 22:42:12 +00009#include "libbb.h"
Denys Vlasenko833d4e72010-11-03 02:38:31 +010010#include "archive.h"
Rob Landleyc1d69902006-01-20 18:28:50 +000011
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}