X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.fastlz%2Fhelp-isv%2Forg.simantics.fastlz.mediawiki;h=90bdf5a129e4a05c661f335670f0480a81c4e8e8;hb=11479b7fd41aa8f3d44b7ec86b9eafe5871f932c;hp=3a4b80a677aa44c503580456d259e4bfcd2bb08b;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.fastlz/help-isv/org.simantics.fastlz.mediawiki b/bundles/org.simantics.fastlz/help-isv/org.simantics.fastlz.mediawiki index 3a4b80a67..90bdf5a12 100644 --- a/bundles/org.simantics.fastlz/help-isv/org.simantics.fastlz.mediawiki +++ b/bundles/org.simantics.fastlz/help-isv/org.simantics.fastlz.mediawiki @@ -1,62 +1,62 @@ -'''org.simantics.fastlz''' is a simple JNI wrapper for different open-source real-time data compression libraries. The native library contains pure C implementations. The library also contains pure Java ports of the algorithms which are employed by the front-end if the native library is not available or if arguments are java heap buffers instead of native direct buffers. - -Current codecs: -;[http://www.fastlz.org/ FastLZ]: Our version is based on [http://fastlz.googlecode.com/svn/trunk/ SVN revision 12]. -;[http://code.google.com/p/lz4/ LZ4]: Our version is based on [http://lz4.googlecode.com/svn/trunk/ SVN revision 68]. - -= Dependencies = - -* No external Java or native dependencies. It is a self-sufficient JAR ready for deployment as OSGi bundle or POJO. Native DLL's only depend on standard libraries that are always available. - -= Manual = - -Use of both FastLZ and LZ4 codecs happens through the [[https://www.simantics.org/svn/simantics/utils/trunk/org.simantics.fastlz/src/org/simantics/fastlz/CompressionCodec.java|org.simantics.fastlz.CompressionCodec]] interface and the [[https://www.simantics.org/svn/simantics/utils/trunk/org.simantics.fastlz/src/org/simantics/fastlz/Compressions.java|org.simantics.fastlz.Compressions]] facade class: -
-public final class Compressions { - - public static final String FASTLZ = "FastLZ"; - public static final String LZ4 = "LZ4"; - - public static CompressionCodec get(String codec); - public static OutputStream write(String codec, File file) throws FileNotFoundException; - public static InputStream read(String codec, File file) throws FileNotFoundException; - -} - -public interface CompressionCodec { - - int compressBound(int inputSize); - int compressBuffer(ByteBuffer input, int inputOffset, int length, - ByteBuffer output, int outputOffset); - - int decompressBuffer(ByteBuffer input, int inputOffset, int length, - ByteBuffer output, int outputOffset, int maxout); - - InputStream read(File file) throws FileNotFoundException; - OutputStream write(File file) throws FileNotFoundException; - -} --
+public final class Compressions { + + public static final String FASTLZ = "FastLZ"; + public static final String LZ4 = "LZ4"; + + public static CompressionCodec get(String codec); + public static OutputStream write(String codec, File file) throws FileNotFoundException; + public static InputStream read(String codec, File file) throws FileNotFoundException; + +} + +public interface CompressionCodec { + + int compressBound(int inputSize); + int compressBuffer(ByteBuffer input, int inputOffset, int length, + ByteBuffer output, int outputOffset); + + int decompressBuffer(ByteBuffer input, int inputOffset, int length, + ByteBuffer output, int outputOffset, int maxout); + + InputStream read(File file) throws FileNotFoundException; + OutputStream write(File file) throws FileNotFoundException; + +} ++