go-hep.org/x/hep@v0.38.1/groot/riofs/sizeof.go (about) 1 // Copyright ©2018 The go-hep Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package riofs 6 7 // tstringSizeof returns the size in bytes of the TString structure. 8 func tstringSizeof(v string) int32 { 9 n := int32(len(v)) 10 if n > 254 { 11 return n + 1 + 4 12 } 13 return n + 1 14 } 15 16 // datimeSizeof returns the size in bytes of the TDatime structure. 17 func datimeSizeof() int32 { 18 return 4 19 }