code: func NewIterGen(t0, intervalHint uint32, b []byte) (IterGen, error) {
  	switch Format(b[0]) {
  	case FormatStandardGoTsz:
  		if len(b) == 1 {
  			return IterGen{}, errShort
  		}
  	case FormatStandardGoTszWithSpan, FormatGoTszLongWithSpan:
  		if len(b) <= 2 {
  			return IterGen{}, errShort
  		}
  		if int(b[1]) >= len(ChunkSpans) {
  			return IterGen{}, errUnknownSpanCode
  		}
  	default:
  		return IterGen{}, errUnknownChunkFormat
  	}
  
  	return IterGen{t0, intervalHint, b}, nil
  }
docs: // NewIterGen creates an IterGen and performs crude validation of the data
  // note: it's ok for intervalHint to be 0 or 1 to mean unknown.
  // it just means that series4h corruptions can't be remediated in single-point-per-chunk scenarios