Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
クライアント側では、LZMA-JSでプレーン テキストを圧縮し、文字列としてサーバーに送信しています。これまでのところ、私が見つけたすべての LZMA Java 実装は、File または InputStream を引数として取ります。String を入力として直接使用する実装はありますか、それともクライアントから取得したデータの周りに InputStream String ラッパーを記述する必要がありますか?
String を InputStream でラップするだけです。
InputStream stream = new ByteArrayInputStream( lzmaString.getBytes(StandardCharsets.UTF_8) );
これで、ライブラリが使用したい InputStream のソースとして String を使用できるようになりました。