equal
deleted
inserted
replaced
199 def read_xz(file: JFile): String = |
199 def read_xz(file: JFile): String = |
200 read_stream(new XZInputStream(new BufferedInputStream(new FileInputStream(file)))) |
200 read_stream(new XZInputStream(new BufferedInputStream(new FileInputStream(file)))) |
201 def read_xz(path: Path): String = read_xz(path.file) |
201 def read_xz(path: Path): String = read_xz(path.file) |
202 |
202 |
203 def read_zstd(file: JFile): String = { |
203 def read_zstd(file: JFile): String = { |
204 Zstd.init_jni |
204 Zstd.init() |
205 read_stream(new ZstdInputStream(new BufferedInputStream(new FileInputStream(file)))) |
205 read_stream(new ZstdInputStream(new BufferedInputStream(new FileInputStream(file)))) |
206 } |
206 } |
207 def read_zstd(path: Path): String = read_zstd(path.file) |
207 def read_zstd(path: Path): String = read_zstd(path.file) |
208 |
208 |
209 |
209 |
255 def write_xz(path: Path, text: String, options: XZ.Options): Unit = |
255 def write_xz(path: Path, text: String, options: XZ.Options): Unit = |
256 write_xz(path.file, text, options) |
256 write_xz(path.file, text, options) |
257 def write_xz(path: Path, text: String): Unit = write_xz(path, text, XZ.options()) |
257 def write_xz(path: Path, text: String): Unit = write_xz(path, text, XZ.options()) |
258 |
258 |
259 def write_zstd(file: JFile, text: String): Unit = { |
259 def write_zstd(file: JFile, text: String): Unit = { |
260 Zstd.init_jni |
260 Zstd.init() |
261 write_file(file, text, (s: OutputStream) => new ZstdOutputStream(new BufferedOutputStream(s))) |
261 write_file(file, text, (s: OutputStream) => new ZstdOutputStream(new BufferedOutputStream(s))) |
262 } |
262 } |
263 def write_zstd(path: Path, text: String): Unit = write_zstd(path.file, text) |
263 def write_zstd(path: Path, text: String): Unit = write_zstd(path.file, text) |
264 |
264 |
265 def write_backup(path: Path, text: String): Unit = { |
265 def write_backup(path: Path, text: String): Unit = { |