2006-07-03 01:17:05 +05:30
|
|
|
/* vi: set sw=4 ts=4: */
|
2002-11-03 19:35:15 +05:30
|
|
|
/*
|
2006-05-29 13:12:02 +05:30
|
|
|
* Copyright 2002 Glenn McGrath
|
2002-11-03 19:35:15 +05:30
|
|
|
*
|
2006-05-29 13:12:02 +05:30
|
|
|
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
2002-11-03 19:35:15 +05:30
|
|
|
*/
|
|
|
|
|
2002-10-19 16:10:55 +05:30
|
|
|
#include "libbb.h"
|
2002-11-03 19:35:15 +05:30
|
|
|
#include "unarchive.h"
|
2002-10-19 16:10:55 +05:30
|
|
|
|
2008-06-27 08:22:20 +05:30
|
|
|
void FAST_FUNC data_extract_to_buffer(archive_handle_t *archive_handle)
|
2002-10-19 16:10:55 +05:30
|
|
|
{
|
2006-12-22 05:51:07 +05:30
|
|
|
unsigned int size = archive_handle->file_header->size;
|
2002-11-03 19:35:15 +05:30
|
|
|
|
2006-05-29 13:12:02 +05:30
|
|
|
archive_handle->buffer = xzalloc(size + 1);
|
2006-07-16 13:44:35 +05:30
|
|
|
xread(archive_handle->src_fd, archive_handle->buffer, size);
|
2002-10-19 16:10:55 +05:30
|
|
|
}
|