Skip to content

Freeze and thaw with Nippy at the command line

License

Notifications You must be signed in to change notification settings

parkside-securities/brisk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brisk

Freeze and thaw with Nippy at the command line.

Install

Download the latest from the releases page.

Usage

Freeze data:

brisk --freeze -i data.edn -o data.nippy

Thaw data:

brisk --thaw -i data.nippy -o data.edn

If input or output is not specified, stdin or stdout will be used:

cat data.edn | brisk -f | brisk -t > data2.edn

Babashka pod support

There are two functions exposed via the pod interface:

  • (freeze-to-file filename data) - returns the number of bytes written
  • (thaw-from-file filename) - returns data thawed from the file

Example:

#!/usr/bin/env bb

(require '[babashka.pods :as pods])
(pods/load-pod "brisk")
(require '[pod.brisk :as brisk])

(brisk/freeze-to-file "pod.nippy" {:han :solo})
(prn (brisk/thaw-from-file "pod.nippy"))

Development

Not quite ready yet. This depends on a soon-to-be-released library.

Things that don't work

  • Embedded objects - Nippy can handle them, but Graal VM does not support them.

About

Freeze and thaw with Nippy at the command line

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 87.2%
  • Shell 12.8%