src/Pure/General/xz.scala
author wenzelm
Fri, 20 Apr 2018 22:17:42 +0200
changeset 68018 3747fe57eb67
parent 64004 b4ece7a3f2ca
child 71961 af779738a8f9
permissions -rw-r--r--
support for XZ.Cache;

/*  Title:      Pure/General/xz.scala
    Author:     Makarius

Support for XZ data compression.
*/

package isabelle


import org.tukaani.xz.{LZMA2Options, ArrayCache, BasicArrayCache}


object XZ
{
  /* options */

  type Options = LZMA2Options

  def options(preset: Int = 3): Options =
  {
    val opts = new LZMA2Options
    opts.setPreset(preset)
    opts
  }


  /* cache */

  type Cache = ArrayCache

  def cache(): ArrayCache = ArrayCache.getDefaultCache()
  def make_cache(): ArrayCache = new BasicArrayCache
}