1/* 2 * squashfs with lzma compression 3 * 4 * Copyright (C) 2010, Broadcom Corporation. All Rights Reserved. 5 * 6 * Permission to use, copy, modify, and/or distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * 18 * $Id: sqlzma.h,v 1.3 2009/03/10 08:42:14 Exp $ 19 */ 20#ifndef __sqlzma_h__ 21#define __sqlzma_h__ 22 23#ifndef __KERNEL__ 24#include <stdlib.h> 25#include <string.h> 26#endif 27 28/* 29 * detect the compression method automatically by the first byte of compressed 30 * data. 31 */ 32#define is_lzma(c) (c == 0x5d) 33 34int LzmaUncompress(char *dst, unsigned long * dstlen, char *src, int srclen); 35int LzmaCompress(char *in_data, int in_size, char *out_data, int out_size, unsigned long *total_out); 36 37#endif 38