Ejemplo n.º 1
0
static int
archive_filter_lz4_free(struct archive_write_filter *f)
{
	struct private_data *data = (struct private_data *)f->data;

	if (data->lz4_stream != NULL) {
		if (data->compression_level < 3)
#if LZ4_VERSION_MINOR >= 3
			LZ4_freeStream(data->lz4_stream);
#else
			LZ4_free(data->lz4_stream);
#endif
		else
			LZ4_freeHC(data->lz4_stream);
	}
static int
archive_filter_lz4_free(struct archive_write_filter *f)
{
	struct private_data *data = (struct private_data *)f->data;

	if (data->lz4_stream != NULL) {
#ifdef HAVE_LZ4HC_H
		if (data->compression_level >= 3)
#if LZ4_VERSION_MAJOR >= 1 && LZ4_VERSION_MINOR >= 7
			LZ4_freeStreamHC(data->lz4_stream);
#else
			LZ4_freeHC(data->lz4_stream);
#endif
		else
#endif
#if LZ4_VERSION_MINOR >= 3
			LZ4_freeStream(data->lz4_stream);
#else
			LZ4_free(data->lz4_stream);
#endif
	}