r/elixir • u/Shoddy_One4465 • 16h ago
asdf 0.1.0 — Elixir library for the Advanced Scientific Data Format
ASDF (pronounced “Az-diff”) is a scientific interchange format: a YAML metadata tree plus binary array blocks in one file. The Space Telescope Science Institute develops it. JWST, Roman, DKIST, and Rubin use it. This library is an Elixir implementation of standard 1.5.0. It is not the asdf version manager.
0.1.0 reads and writes file format 1.0.0. Open reads the header, the tree, and the block headers, and does not decode payloads until you ask. Contiguous numeric blocks and zlib work. Elixir ~> 1.17. BSD-3-Clause.
def deps do
[
{:asdf, "~> 0.1.0"}
]
end
:ok = ASDF.write!("observation.asdf", %{"count" => 2, "items" => [10, 20]})
handle = ASDF.open!("observation.asdf")
ASDF.read!(handle, ["items", 0])
ASDF.close!(handle)
ASDF.read!(handle, ["items", 0]) returns 10.
Not in 0.1.0: bzip2, lz4, external URLs, streamed writes, astronomy schemas. see the roadmap.
- https://github.com/baoulo/asdf-elixir
- https://hex.pm/packages/asdf
- https://www.asdf-format.org/en/latest/overview.html