func (f *File) CreateTableFrom(name string, dtype interface{}, chunkSize, compression int) (*Table, error) {
	return createTableFrom(f.id, name, dtype, chunkSize, compression)
}
Creates a packet table to store fixed-length packets.
hid_t H5PTcreate_fl( hid_t loc_id, const char * dset_name, hid_t dtype_id, hsize_t chunk_size, int compression )
package hdf5
import "C"
import (
	"fmt"
	"runtime"
	"unsafe"
)
const (
	F_ACC_RDONLY  int = 0x0000  
	F_ACC_RDWR    int = 0x0001  
	F_ACC_TRUNC   int = 0x0002  
	F_ACC_EXCL    int = 0x0004  
	F_ACC_DEBUG   int = 0x0008  
	F_ACC_CREAT   int = 0x0010  
	F_ACC_DEFAULT int = 0xffff  
)
type Scope C.H5F_scope_t
const (
	F_SCOPE_LOCAL  Scope = 0  
	F_SCOPE_GLOBAL Scope = 1  
)
type File struct {
	CommonFG
}
func (f *File) finalizer() {
	if err := f.Close(); err != nil {
		panic(fmt.Errorf("error closing file: %s", err))
	}
}
func newFile(id C.hid_t) *File {
	f := &File{CommonFG{Location{Identifier{id}}}}
	runtime.SetFinalizer(f, (*File).finalizer)
	return f
}
func CreateFile(name string, flags int) (*File, error) {
	c_name := C.CString(name)
	defer C.free(unsafe.Pointer(c_name))
	hid := C.H5Fcreate(c_name, C.uint(flags), P_DEFAULT.id, P_DEFAULT.id)
	if err := checkID(hid); err != nil {
		return nil, fmt.Errorf("error creating hdf5 file: %s", err)
	}
	return newFile(hid), nil
}
func OpenFile(name string, flags int) (*File, error) {
	c_name := C.CString(name)
	defer C.free(unsafe.Pointer(c_name))
	hid := C.H5Fopen(c_name, C.uint(flags), P_DEFAULT.id)
	if err := checkID(hid); err != nil {
		return nil, fmt.Errorf("error opening hdf5 file: %s", err)
	}
	return newFile(hid), nil
}
func (f *File) ReOpen() (*File, error) {
	hid := C.H5Freopen(f.id)
	if err := checkID(hid); err != nil {
		return nil, fmt.Errorf("error reopening hdf5 file: %s", err)
	}
	return newFile(hid), nil
}
func IsHDF5(name string) bool {
	c_name := C.CString(name)
	defer C.free(unsafe.Pointer(c_name))
	return C.H5Fis_hdf5(c_name) > 0
}
func (f *File) Close() error {
	if f.id == 0 {
		return nil
	}
	err := h5err(C.H5Fclose(f.id))
	f.id = 0
	return err
}
func (f *File) Flush(scope Scope) error {
	return h5err(C.H5Fflush(f.id, C.H5F_scope_t(scope)))
}
func (f *File) FileName() string {
	sz := int(C.H5Fget_name(f.id, nil, 0)) + 1
	if sz < 0 {
		return ""
	}
	buf := string(make([]byte, sz))
	c_buf := C.CString(buf)
	defer C.free(unsafe.Pointer(c_buf))
	sz = int(C.H5Fget_name(f.id, c_buf, C.size_t(sz)))
	if sz < 0 {
		return ""
	}
	return C.GoString(c_buf)
}
var cdot = C.CString(".")
func (f *File) CreateTable(name string, dtype *Datatype, chunkSize, compression int) (*Table, error) {
	return createTable(f.id, name, dtype, chunkSize, compression)
}