blob: 1d74e03357f2725d526dfce808e839aca08ecf74 [file] [log] [blame]
"Robert P. J. Day"63fc1a92006-07-02 19:47:05 +00001/* vi: set sw=4 ts=4: */
Glenn L McGrath237ae422002-11-03 14:05:15 +00002/*
Rob Landley1ec5b292006-05-29 07:42:02 +00003 * Copyright 2002 Glenn McGrath
Glenn L McGrath237ae422002-11-03 14:05:15 +00004 *
Rob Landley1ec5b292006-05-29 07:42:02 +00005 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Glenn L McGrath237ae422002-11-03 14:05:15 +00006 */
7
Glenn L McGrath61b79042002-10-19 10:40:55 +00008#include "libbb.h"
Glenn L McGrath237ae422002-11-03 14:05:15 +00009#include "unarchive.h"
Glenn L McGrath61b79042002-10-19 10:40:55 +000010
Denis Vlasenkodefc1ea2008-06-27 02:52:20 +000011void FAST_FUNC data_extract_to_buffer(archive_handle_t *archive_handle)
Glenn L McGrath61b79042002-10-19 10:40:55 +000012{
Denis Vlasenko714701c2006-12-22 00:21:07 +000013 unsigned int size = archive_handle->file_header->size;
Glenn L McGrath237ae422002-11-03 14:05:15 +000014
Rob Landley1ec5b292006-05-29 07:42:02 +000015 archive_handle->buffer = xzalloc(size + 1);
Rob Landley53437472006-07-16 08:14:35 +000016 xread(archive_handle->src_fd, archive_handle->buffer, size);
Glenn L McGrath61b79042002-10-19 10:40:55 +000017}