src/Pure/General/xz.scala
author wenzelm
Sat, 02 Jan 2021 15:58:48 +0100
changeset 73024 337e1b135d2f
parent 71961 af779738a8f9
child 75393 87ebf5a50283
permissions -rw-r--r--
clarified signature --- internal Cache.none;

/*  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

  object Cache
  {
    def none: ArrayCache = ArrayCache.getDummyCache()
    def apply(): ArrayCache = ArrayCache.getDefaultCache()
    def make(): ArrayCache = new BasicArrayCache
  }
}