Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 java.desktop.jmod - Desktop Module
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module.
JDK 17 Desktop module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.desktop.jmod.
JDK 17 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Desktop module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/imageio/plugins/common/LZWCompressor.java
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.imageio.plugins.common;
import java.io.IOException;
import java.io.PrintStream;
import javax.imageio.stream.ImageOutputStream;
/*
* Modified from original LZWCompressor to change interface to passing a
* buffer of data to be compressed.
*/
public class LZWCompressor {
/** base underlying code size of data being compressed 8 for TIFF, 1 to 8 for GIF **/
int codeSize;
/** reserved clear code based on code size **/
int clearCode;
/** reserved end of data code based on code size **/
int endOfInfo;
/** current number bits output for each code **/
int numBits;
/** limit at which current number of bits code size has to be increased **/
int limit;
/** the prefix code which represents the predecessor string to current input point **/
short prefix;
/** output destination for bit codes **/
BitFile bf;
/** general purpose LZW string table **/
LZWStringTable lzss;
/** modify the limits of the code values in LZW encoding due to TIFF bug / feature **/
boolean tiffFudge;
/**
* @param out destination for compressed data
* @param codeSize the initial code size for the LZW compressor
* @param TIFF flag indicating that TIFF lzw fudge needs to be applied
* @exception IOException if underlying output stream error
**/
public LZWCompressor(ImageOutputStream out, int codeSize, boolean TIFF)
throws IOException
{
bf = new BitFile(out, !TIFF); // set flag for GIF as NOT tiff
this.codeSize = codeSize;
tiffFudge = TIFF;
clearCode = 1 << codeSize;
endOfInfo = clearCode + 1;
numBits = codeSize + 1;
limit = (1 << numBits) - 1;
if (tiffFudge) {
--limit;
}
prefix = (short)0xFFFF;
lzss = new LZWStringTable();
lzss.clearTable(codeSize);
bf.writeBits(clearCode, numBits);
}
/**
* @param buf data to be compressed to output stream
* @exception IOException if underlying output stream error
**/
public void compress(byte[] buf, int offset, int length)
throws IOException
{
int idx;
byte c;
short index;
int maxOffset = offset + length;
for (idx = offset; idx < maxOffset; ++idx) {
c = buf[idx];
if ((index = lzss.findCharString(prefix, c)) != -1) {
prefix = index;
} else {
bf.writeBits(prefix, numBits);
if (lzss.addCharString(prefix, c) > limit) {
if (numBits == 12) {
bf.writeBits(clearCode, numBits);
lzss.clearTable(codeSize);
numBits = codeSize + 1;
} else {
++numBits;
}
limit = (1 << numBits) - 1;
if (tiffFudge) {
--limit;
}
}
prefix = (short)((short)c & 0xFF);
}
}
}
/*
* Indicate to compressor that no more data to go so write out
* any remaining buffered data.
*
* @exception IOException if underlying output stream error
*/
public void flush() throws IOException {
if (prefix != -1) {
bf.writeBits(prefix, numBits);
}
bf.writeBits(endOfInfo, numBits);
bf.flush();
}
public void dump(PrintStream out) {
lzss.dump(out);
}
}
⏎ com/sun/imageio/plugins/common/LZWCompressor.java
Or download all of them as a single archive file:
File name: java.desktop-17.0.5-src.zip File size: 9152233 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.instrument.jmod - Instrument Module
2023-09-16, ≈967🔥, 0💬
Popular Posts:
Where to get the Java source code for Connector/J 8.0 User API module? Java source code files for Co...
Old version of xml-apis.jar. JAR File Size and Download Location: File name: xmlParserAPIs.jar File ...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...
JDK 17 jdk.javadoc.jmod is the JMOD file for JDK 17 Java Document tool, which can be invoked by the ...