• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

example/H03-May-2022-576428

misc/H03-May-2022-400377

project/H03-May-2022-6853

src/H03-May-2022-7,7015,220

.gitignoreH A D20-Feb-2012419 3938

ChangeLogH A D20-Feb-20125.4 KiB153116

READMEH A D20-Feb-20125 KiB136107

pom.xmlH A D20-Feb-20121.1 KiB3935

README

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