1 |
|
/* -*- c-basic-offset: 8 -*- |
2 |
|
rdesktop: A Remote Desktop Protocol client. |
3 |
|
Protocol services - RDP decompression |
4 |
|
Copyright (C) Matthew Chapman 1999-2004 |
5 |
|
|
6 |
|
This program is free software; you can redistribute it and/or modify |
7 |
|
it under the terms of the GNU General Public License as published by |
8 |
|
the Free Software Foundation; either version 2 of the License, or |
9 |
|
(at your option) any later version. |
10 |
|
|
11 |
|
This program is distributed in the hope that it will be useful, |
12 |
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
|
GNU General Public License for more details. |
15 |
|
|
16 |
|
You should have received a copy of the GNU General Public License |
17 |
|
along with this program; if not, write to the Free Software |
18 |
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 |
|
*/ |
20 |
|
|
21 |
#include <stdio.h> |
#include <stdio.h> |
22 |
#include <string.h> |
#include <string.h> |
23 |
|
|
26 |
/* mppc decompression */ |
/* mppc decompression */ |
27 |
/* http://www.faqs.org/rfcs/rfc2118.html */ |
/* http://www.faqs.org/rfcs/rfc2118.html */ |
28 |
|
|
29 |
/* TODO: research the below statements */ |
/* Contacts: */ |
30 |
|
|
31 |
|
/* hifn contact mentioned in the faq is */ |
32 |
|
/* Robert Friend rfriend at hifn dot com */ |
33 |
|
|
34 |
/* there exists one or more patents */ |
/* if you have questions regarding MPPC */ |
35 |
/* related to compression algorithms */ |
/* our contact is */ |
36 |
|
/* Guus Dhaeze GDhaeze at hifn dot com */ |
37 |
|
|
38 |
/* since we are only decompressing I */ |
/* Licensing: */ |
|
/* think the end-user is safe. */ |
|
39 |
|
|
40 |
/* even if that isn't true, aren't you */ |
/* decompression is alright as long as we */ |
41 |
/* already paying royalties */ |
/* don't compress data */ |
42 |
/* through the CAL licenses? */ |
|
43 |
|
/* Algorithm: */ |
44 |
|
|
45 |
/* as the rfc states the algorithm seems to */ |
/* as the rfc states the algorithm seems to */ |
46 |
/* be LZ77 with a sliding buffer */ |
/* be LZ77 with a sliding buffer */ |
47 |
/* that is empty at init. */ |
/* that is empty at init. */ |
48 |
|
|
49 |
/* as of my limited knowledge these patents */ |
/* the algorithm is called LZS and is */ |
50 |
/* has expired. */ |
/* patented for another couple of years. */ |
51 |
|
|
52 |
|
/* more information is available in */ |
53 |
|
/* http://www.ietf.org/ietf/IPR/hifn-ipr-draft-friend-tls-lzs-compression.txt */ |
54 |
|
|
55 |
|
|
56 |
RDPCOMP g_mppc_dict; |
RDPCOMP g_mppc_dict; |