forked from ymnk/jzlib
-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
135 lines (107 loc) · 5 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
JZlib
zlib in pure Java(TM)
by [email protected], JCraft,Inc.
http://www.jcraft.com/jzlib/
Last modified: Mon Sep 19 15:28:43 UTC 2011
Description
===========
JZlib is a re-implementation of zlib in pure Java.
The first and final aim for hacking this stuff is
to add the packet compression support to pure Java SSH systems.
Documentation
=============
* README files all over the source tree have info related to the stuff
in the directories.
* ChangeLog: what changed from the previous version?
* LICENSE.txt
Directories & Files in the Source Tree
======================================
* src/main/java has source trees of JZlib.
* example/ has some samples, which demonstrate the usages.
* misc/ has some stuffs. At present, this directory includes
a patch file for MindTerm v.1.2.1, which adds the packet compression
functionality.
Features
========
* Needless to say, JZlib can inflate data, which is deflated by zlib and
JZlib can generate deflated data, which is acceptable and inflated by zlib.
* JZlib supports all compression level and all flushing mode in zlib.
* JZlib does not support gzip file handling supports.
* The performance has not been estimated yet, but it will be not so bad
in deflating/inflating data stream on the low bandwidth network.
* JZlib is under BSD style license.
* Any invention has not been done in developing JZlib.
So, if zlib is patent free, JZlib is also not covered by any patents.
Why JZlib?
==========
Java Platform API provides packages 'java.util.zip.*' for
accessing to zlib, but that support is very limited
if you need to use the essence of zlib. For example,
we needed to full access to zlib to add the packet compression
support to pure Java SSH system, but they are useless for our requirements.
The Internet draft, SSH Transport Layer Protocol, says in the section '4.2 Compression' as follows,
The following compression methods are currently defined:
none REQUIRED no compression
zlib OPTIONAL GNU ZLIB (LZ77) compression
The "zlib" compression is described in [RFC-1950] and in [RFC-1951]. The
compression context is initialized after each key exchange, and is
passed from one packet to the next with only a partial flush being
performed at the end of each packet. A partial flush means that all data
will be output, but the next packet will continue using compression
tables from the end of the previous packet.
To implement this functionality, the Z_PARTIAL_FLUSH mode of zlib must be
used, however JDK does not permit us to do so. It seems that this problem has
been well known and some people have already reported to
JavaSoft's BugParade(for example, BugId:4255743),
but any positive response has not been returned from JavaSoft,
so this problem will not be solved forever.
This is our motivation to hack JZlib.
Building Jar File
=================
Use 'sbt'(https://github.com/harrah/xsbt/wiki),
% sbt package
or
% mvn package
or
% cd src/main/java
% javac -target 1.5 com/jcraft/jzlib/*.java
% jar -cvf jzlib.jar com/jcraft/jzlib/*.class
A unofficial patch for MindTerm v.1.2.1
=======================================
A unofficial patch file for MindTerm v.1.2.1 has included in 'misc' directory.
It adds the packet compression support to MindTerm.
Please refer to 'misc/README' file.
Copyrights & Disclaimers
========================
JZlib is copyrighted by ymnk, JCraft,Inc. and is licensed through BSD
style license. Read the LICENSE.txt file for the complete license.
Credits
=======
JZlib has been developed by [email protected],
but he has just re-implemented zlib in pure Java.
So, all credit should go to authors Jean-loup Gailly and Mark Adler
and contributors of zlib. Here is the copyright notice of zlib version 1.1.3,
|Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
|
|This software is provided 'as-is', without any express or implied
|warranty. In no event will the authors be held liable for any damages
|arising from the use of this software.
|
|Permission is granted to anyone to use this software for any purpose,
|including commercial applications, and to alter it and redistribute it
|freely, subject to the following restrictions:
|
|1. The origin of this software must not be misrepresented; you must not
| claim that you wrote the original software. If you use this software
| in a product, an acknowledgment in the product documentation would be
| appreciated but is not required.
|2. Altered source versions must be plainly marked as such, and must not be
| misrepresented as being the original software.
|3. This notice may not be removed or altered from any source distribution.
|
|Jean-loup Gailly Mark Adler
If you have any comments, suggestions and questions, write us
``SSH is a registered trademark and Secure Shell is a trademark of
SSH Communications Security Corp (www.ssh.com)''.