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
|
|
|
|
2006-03-07 02:17:33 +05:30
|
|
|
void data_extract_to_buffer(archive_handle_t *archive_handle)
|
2002-10-19 16:10:55 +05:30
|
|
|
{
|
2002-11-07 04:01:45 +05:30
|
|
|
const 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);
|
2002-11-07 04:01:45 +05:30
|
|
|
|
|
|
|
archive_xread_all(archive_handle, archive_handle->buffer, size);
|
2002-10-19 16:10:55 +05:30
|
|
|
}
|