Go bindings to the HDF5 library
Go Makefile
Latest commit dbf32d9 May 4, 2016 @simleb simleb Fix string attributes broken by new cgo rules
Strings are unique as they are the only datatype whose concrete type is a
pointer (`char*`). This becomes a problem in Go 1.6 when trying to feed
`H5Awrite` a pointer to the backing array of the original string as it becomes
a pointer to a Go pointer and this [provokes a panic][1].

This commit fixes the problem at the expense of copying the strings. Hopefully
this is not as big a problem for attributes since they tend to be small
compared to datasets.

[1]: https://golang.org/doc/go1.6#cgo
Permalink
Failed to load latest commit information.
cmd
LICENSE LICENSE: go-hdf5 Feb 6, 2015
Makefile
README.md
cgoflags.go
errors.go
h5a.go
h5a_test.go
h5d.go
h5d_test.go
h5f.go
h5f_test.go
h5g.go
h5g_test.go
h5i.go Update some comments Oct 1, 2014
h5p.go
h5pt.go Fix Close method for packet tables (so tests pass) Nov 6, 2014
h5pt_test.go
h5s.go
h5s_test.go
h5t.go Fix insidious finalizer bug on compound datatypes Nov 6, 2014
h5t_shim.go Remove unused c header file. Sep 30, 2014
h5t_test.go Add test for finalizer bug Nov 6, 2014
hdf5.go
hdf5_test.go

README.md

go-hdf5

Build Status GoDoc

Naive cgo bindings for the C-API of hdf5.

Documentation

http://godoc.org/github.com/sbinet/go-hdf5

Example

Note

  • Only version 1.8.x of HDF5 is supported.
  • In order to use HDF5 functions in more than one goroutine simultaneously, you must build the HDF5 library with threading support. Many binary distributions (RHEL/centos/Fedora packages, etc.) do not have this enabled. Therefore, you must build HDF5 yourself on these systems.

Known problems

  • the h5pt packet table interface is broken.
  • support for structs with slices and strings as fields is broken