src/Pure/General/xz.scala
author desharna
Mon, 23 May 2022 10:23:33 +0200
changeset 75460 7c2fe41f5ee8
parent 75393 87ebf5a50283
child 75620 44815dc2b8f9
permissions -rw-r--r--
NEWS

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