1/*  Title:      Pure/General/xz.scala
2    Author:     Makarius
3
4Support for XZ data compression.
5*/
6
7package isabelle
8
9
10import org.tukaani.xz.{LZMA2Options, ArrayCache, BasicArrayCache}
11
12
13object XZ
14{
15  /* options */
16
17  type Options = LZMA2Options
18
19  def options(preset: Int = 3): Options =
20  {
21    val opts = new LZMA2Options
22    opts.setPreset(preset)
23    opts
24  }
25
26
27  /* cache */
28
29  type Cache = ArrayCache
30
31  def cache(): ArrayCache = ArrayCache.getDefaultCache()
32  def make_cache(): ArrayCache = new BasicArrayCache
33}
34