| author | paulson <lp15@cam.ac.uk> |
| Sun, 03 Apr 2022 14:48:55 +0100 | |
| changeset 75400 | 970b9ab6c439 |
| parent 75393 | 87ebf5a50283 |
| child 75620 | 44815dc2b8f9 |
| permissions | -rw-r--r-- |
| 64000 | 1 |
/* Title: Pure/General/xz.scala |
|
52671
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
|
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
3 |
|
| 64002 | 4 |
Support for XZ data compression. |
|
52671
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
5 |
*/ |
|
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
6 |
|
|
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
7 |
package isabelle |
|
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
8 |
|
|
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
9 |
|
| 68018 | 10 |
import org.tukaani.xz.{LZMA2Options, ArrayCache, BasicArrayCache}
|
|
52671
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
11 |
|
|
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
12 |
|
| 75393 | 13 |
object XZ {
|
| 68018 | 14 |
/* options */ |
15 |
||
| 64002 | 16 |
type Options = LZMA2Options |
17 |
||
| 75393 | 18 |
def options(preset: Int = 3): Options = {
|
| 64000 | 19 |
val opts = new LZMA2Options |
20 |
opts.setPreset(preset) |
|
21 |
opts |
|
22 |
} |
|
| 68018 | 23 |
|
24 |
||
25 |
/* cache */ |
|
26 |
||
27 |
type Cache = ArrayCache |
|
28 |
||
| 75393 | 29 |
object Cache {
|
| 73024 | 30 |
def none: ArrayCache = ArrayCache.getDummyCache() |
31 |
def apply(): ArrayCache = ArrayCache.getDefaultCache() |
|
32 |
def make(): ArrayCache = new BasicArrayCache |
|
33 |
} |
|
|
52671
9a360530eac8
separate module XZ_File to avoid initial dependency on org.tukaani.xz;
wenzelm
parents:
diff
changeset
|
34 |
} |