Fork me on GitHub

Scientific file formats, in pure Go.
Planned: nothing is released yet.

go-sciio is the organisation the go-scikit plan names for what MATLAB's file functions and Mathematica's Import read and write: HDF5, MAT, NetCDF, FITS, npy, Matrix Market, WAV and FLAC. It is wave 2 of the plan; no library and no code exist yet.

planned wave 28 packages in the plan0 releases
status
state    planned (wave 2)
library  none yet
plan     github.com/go-scikit/roadmap
         PLAN.md, STATUS.md
8 planned packages โ€” no library released: see the plan's status
What it will cover

File formats, read and written as the references do.

Every item starts from the roadmap's bibliography, is validated against the tool that is the reference in its domain, and lands with tests at 100% coverage and a performance table: no slower than the reference on one core.

๐Ÿ—„๏ธ

HDF5

Reader and writer for the File Format Specification 3.0, the base of MAT v7.3 and NetCDF-4. Whether it wraps an audited package or is written here is still open.

๐Ÿงฎ

MAT-files

Versions 4, 5, 7 and 7.3, the last on top of the HDF5 package.

๐ŸŒ

NetCDF

Classic (CDF-1, 2, 5) and NetCDF-4, with the CF conventions' units.

๐Ÿ”ญ

FITS

FITS 4.0: images, binary tables and compressed images.

๐Ÿ”ข

npy and Matrix Market

NumPy .npy and .npz; Matrix Market coordinate and array files.

๐ŸŽง

Audio

WAV, and FLAC decoding (RFC 9639).

๐Ÿ›ก๏ธ

Hostile input

Fuzzing and a limit on the allocation a header can ask for, in line with the fleet's decompression-bomb standard.

๐Ÿ“ฆ

Pure Go, CGO=0

No cgo on any architecture the fleet's CI tests. The C libraries are oracles, never dependencies.

What will be checked

3 kinds of check, each against a reference.

These are the measures the plan holds the work to. None has been run: there is no code yet.

Exact reads

Integers, strings and raw floats read back byte for byte equal to the reference reader’s.

Round trips

Write in Go, read with h5py, astropy or SciPy, and the arrays are identical; read in Go a file those tools wrote, and the same.

Hostile input

go test -fuzz for panics, and a limit on the allocation a hostile header can ask for.

Planned packages

What will be here.

The names are provisional. None of these repositories exists yet.

h5

planned (wave 2)

HDF5 (File Format Specification 3.0), reader and writer. Validated against h5py, h5dump and the HDF Group's example files.

mat

planned (wave 2)

MAT-files v4, v5, v7 and v7.3, the last on top of h5. Validated against scipy.io and h5py.

netcdf

planned (wave 2)

NetCDF classic (CDF-1, 2, 5) and NetCDF-4 on top of h5. Validated against netcdf-c's ncdump and its test files.

fits

planned (wave 2)

FITS 4.0: images, binary tables and compressed images. Validated against astropy.io.fits and NASA's FITS samples.

npy

planned (wave 2)

NumPy .npy and .npz. Validated against NumPy.

mtx

planned (wave 2)

Matrix Market, coordinate and array. Validated against scipy.io.mmread. go-sparse's wave 1 also lists Matrix Market I/O: the line between the two is yet to be drawn.

wav

planned (wave 2)

WAV, PCM and float. Validated against scipy.io.wavfile.

flac

planned (wave 2)

FLAC decoding (RFC 9639). Validated against the IETF working group's FLAC test files.

Repositories

What is here.

docs

site

The documentation (Hugo + Hextra): the scope of the organisation, the plan and one page per planned package. Source โ†’

brand

assets

Logos and icons for the organization, in SVG / PNG / JPG / ICO / ICNS across colour, white and black variants.

Scientific file formats for Go.

go-sciio is planned, wave 2 of the go-scikit roadmap. The plan says what it will cover and in what order, and its status says where each item stands. The documentation repeats the scope and the references.

Read the source on GitHub โ†’