decompress_unlzma.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) decompress_unlzma.c (d89775fc929c5a1d91ed518a71b456da0865e5ff)
1/* Lzma decompressor for Linux kernel. Shamelessly snarfed
2 *from busybox 1.1.1
3 *
4 *Linux kernel adaptation
5 *Copyright (C) 2006 Alain < alain@knaff.lu >
6 *
7 *Based on small lzma deflate implementation/Small range coder
8 *implementation for lzma.
9 *Copyright (C) 2006 Aurelien Jacobs < aurel@gnuage.org >
10 *
1/* Lzma decompressor for Linux kernel. Shamelessly snarfed
2 *from busybox 1.1.1
3 *
4 *Linux kernel adaptation
5 *Copyright (C) 2006 Alain < alain@knaff.lu >
6 *
7 *Based on small lzma deflate implementation/Small range coder
8 *implementation for lzma.
9 *Copyright (C) 2006 Aurelien Jacobs < aurel@gnuage.org >
10 *
11 *Based on LzmaDecode.c from the LZMA SDK 4.22 (http://www.7-zip.org/)
11 *Based on LzmaDecode.c from the LZMA SDK 4.22 (https://www.7-zip.org/)
12 *Copyright (C) 1999-2005 Igor Pavlov
13 *
14 *Copyrights of the parts, see headers below.
15 *
16 *
17 *This program is free software; you can redistribute it and/or
18 *modify it under the terms of the GNU Lesser General Public
19 *License as published by the Free Software Foundation; either

--- 31 unchanged lines hidden (view full) ---

51
52#define ENDIAN_CONVERT(x) \
53 x = (typeof(x))read_int((unsigned char *)&x, sizeof(x))
54
55
56/* Small range coder implementation for lzma.
57 *Copyright (C) 2006 Aurelien Jacobs < aurel@gnuage.org >
58 *
12 *Copyright (C) 1999-2005 Igor Pavlov
13 *
14 *Copyrights of the parts, see headers below.
15 *
16 *
17 *This program is free software; you can redistribute it and/or
18 *modify it under the terms of the GNU Lesser General Public
19 *License as published by the Free Software Foundation; either

--- 31 unchanged lines hidden (view full) ---

51
52#define ENDIAN_CONVERT(x) \
53 x = (typeof(x))read_int((unsigned char *)&x, sizeof(x))
54
55
56/* Small range coder implementation for lzma.
57 *Copyright (C) 2006 Aurelien Jacobs < aurel@gnuage.org >
58 *
59 *Based on LzmaDecode.c from the LZMA SDK 4.22 (http://www.7-zip.org/)
59 *Based on LzmaDecode.c from the LZMA SDK 4.22 (https://www.7-zip.org/)
60 *Copyright (c) 1999-2005 Igor Pavlov
61 */
62
63#include <linux/compiler.h>
64
65#define LZMA_IOBUF_SIZE 0x10000
66
67struct rc {

--- 140 unchanged lines hidden (view full) ---

208 *symbol -= 1 << num_levels;
209}
210
211
212/*
213 * Small lzma deflate implementation.
214 * Copyright (C) 2006 Aurelien Jacobs < aurel@gnuage.org >
215 *
60 *Copyright (c) 1999-2005 Igor Pavlov
61 */
62
63#include <linux/compiler.h>
64
65#define LZMA_IOBUF_SIZE 0x10000
66
67struct rc {

--- 140 unchanged lines hidden (view full) ---

208 *symbol -= 1 << num_levels;
209}
210
211
212/*
213 * Small lzma deflate implementation.
214 * Copyright (C) 2006 Aurelien Jacobs < aurel@gnuage.org >
215 *
216 * Based on LzmaDecode.c from the LZMA SDK 4.22 (http://www.7-zip.org/)
216 * Based on LzmaDecode.c from the LZMA SDK 4.22 (https://www.7-zip.org/)
217 * Copyright (C) 1999-2005 Igor Pavlov
218 */
219
220
221struct lzma_header {
222 uint8_t pos;
223 uint32_t dict_size;
224 uint64_t dst_size;

--- 455 unchanged lines hidden ---
217 * Copyright (C) 1999-2005 Igor Pavlov
218 */
219
220
221struct lzma_header {
222 uint8_t pos;
223 uint32_t dict_size;
224 uint64_t dst_size;

--- 455 unchanged lines hidden ---