Skip to main content
Interwork Corporation
IDR Solutions Product Support Portal
モードの切替 ダーク/ライト/自動 モードの切替 ダーク/ライト/自動 モードの切替 ダーク/ライト/自動

JavaでLZWデータを解凍する

JDeliには、LZWアルゴリズムで圧縮されたデータをJavaで解凍するためのフィルターオプションが含まれています。この解凍フィルターは100% Javaで記述されており、依存関係はありません。

主な特徴:

  • 100% Javaソリューション。dllやネイティブコードへの依存なし
  • メモリ上またはディスク上で処理可能

Javaでデータを解凍する方法:

final LZWFilterOptions options = new LZWFilterOptions();
options.setMode(FilterOptions.FilterMode.DECOMPRESS);
JDeli.filter(final byte[] raw_data, final LZWFilterOptions options);

または

final LZWFilterOptions options = new LZWFilterOptions();
options.setMode(FilterOptions.FilterMode.DECOMPRESS);
JDeli.filter(final InputStream inputStream, final LZWFilterOptions options, final OutputStream outputStream);

または専用のInputStreamを使用することもできます

final LZWInputStream inputStream = new LZWInputStream(new ByteArrayInputStream(encodedBytes));
byte[] inputStreamResult = inputStream.readAllBytes();

LZWInputStream Javadoc

FilterOptions を使用すると、サポートされているフィルターオプションを設定できます