📄 deflater.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#getAdler()">getAdler</A></B>()</CODE><BR> Returns the ADLER-32 value of the uncompressed data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#getTotalIn()">getTotalIn</A></B>()</CODE><BR> Returns the total number of bytes input so far.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#getTotalOut()">getTotalOut</A></B>()</CODE><BR> Returns the total number of bytes output so far.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#needsInput()">needsInput</A></B>()</CODE><BR> Returns true if the input data buffer is empty and setInput() should be called in order to provide more input.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#reset()">reset</A></B>()</CODE><BR> Resets deflater so that a new set of input data can be processed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#setDictionary(byte[])">setDictionary</A></B>(byte[] b)</CODE><BR> Sets preset dictionary for compression.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#setDictionary(byte[], int, int)">setDictionary</A></B>(byte[] b, int off, int len)</CODE><BR> Sets preset dictionary for compression.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#setInput(byte[])">setInput</A></B>(byte[] b)</CODE><BR> Sets input data for compression.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#setInput(byte[], int, int)">setInput</A></B>(byte[] b, int off, int len)</CODE><BR> Sets input data for compression.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#setLevel(int)">setLevel</A></B>(int level)</CODE><BR> Sets the current compression level to the specified value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/util/zip/Deflater.html#setStrategy(int)">setStrategy</A></B>(int strategy)</CODE><BR> Sets the compression strategy to the specified value.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="DEFLATED"><!-- --></A><H3>DEFLATED</H3><PRE>public static final int <B>DEFLATED</B></PRE><DL><DD>Compression method for the deflate algorithm (the only one currently supported).</DL><HR><A NAME="NO_COMPRESSION"><!-- --></A><H3>NO_COMPRESSION</H3><PRE>public static final int <B>NO_COMPRESSION</B></PRE><DL><DD>Compression level for no compression.</DL><HR><A NAME="BEST_SPEED"><!-- --></A><H3>BEST_SPEED</H3><PRE>public static final int <B>BEST_SPEED</B></PRE><DL><DD>Compression level for fastest compression.</DL><HR><A NAME="BEST_COMPRESSION"><!-- --></A><H3>BEST_COMPRESSION</H3><PRE>public static final int <B>BEST_COMPRESSION</B></PRE><DL><DD>Compression level for best compression.</DL><HR><A NAME="DEFAULT_COMPRESSION"><!-- --></A><H3>DEFAULT_COMPRESSION</H3><PRE>public static final int <B>DEFAULT_COMPRESSION</B></PRE><DL><DD>Default compression level.</DL><HR><A NAME="FILTERED"><!-- --></A><H3>FILTERED</H3><PRE>public static final int <B>FILTERED</B></PRE><DL><DD>Compression strategy best used for data consisting mostly of small values with a somewhat random distribution. Forces more Huffman coding and less string matching.</DL><HR><A NAME="HUFFMAN_ONLY"><!-- --></A><H3>HUFFMAN_ONLY</H3><PRE>public static final int <B>HUFFMAN_ONLY</B></PRE><DL><DD>Compression strategy for Huffman coding only.</DL><HR><A NAME="DEFAULT_STRATEGY"><!-- --></A><H3>DEFAULT_STRATEGY</H3><PRE>public static final int <B>DEFAULT_STRATEGY</B></PRE><DL><DD>Default compression strategy.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Deflater(int, boolean)"><!-- --></A><H3>Deflater</H3><PRE>public <B>Deflater</B>(int level, boolean nowrap)</PRE><DL><DD>Creates a new compressor using the specified compression level. If 'nowrap' is true then the ZLIB header and checksum fields will not be used in order to support the compression format used in both GZIP and PKZIP.<DD><DL><DT><B>Parameters:</B><DD><CODE>level</CODE> - the compression level (0-9)<DD><CODE>nowrap</CODE> - if true then use GZIP compatible compression</DL></DD></DL><HR><A NAME="Deflater(int)"><!-- --></A><H3>Deflater</H3><PRE>public <B>Deflater</B>(int level)</PRE><DL><DD>Creates a new compressor using the specified compression level. Compressed data will be generated in ZLIB format.<DD><DL><DT><B>Parameters:</B><DD><CODE>level</CODE> - the compression level (0-9)</DL></DD></DL><HR><A NAME="Deflater()"><!-- --></A><H3>Deflater</H3><PRE>public <B>Deflater</B>()</PRE><DL><DD>Creates a new compressor with the default compression level. Compressed data will be generated in ZLIB format.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setInput(byte[], int, int)"><!-- --></A><H3>setInput</H3><PRE>public void <B>setInput</B>(byte[] b, int off, int len)</PRE><DL><DD>Sets input data for compression. This should be called whenever needsInput() returns true indicating that more input data is required.<DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the input data bytes<DD><CODE>off</CODE> - the start offset of the data<DD><CODE>len</CODE> - the length of the data<DT><B>See Also: </B><DD><A HREF="../../../java/util/zip/Deflater.html#needsInput()"><CODE>needsInput()</CODE></A></DL></DD></DL><HR><A NAME="setInput(byte[])"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -