MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / Buffer

Struct Buffer

buffer.go:63–77  ·  view source on GitHub ↗

Buffer represents a table data structure with concurrent access support

Source from the content-addressed store, hash-verified

61
62// Buffer represents a table data structure with concurrent access support
63type Buffer struct {
64 sep rune // Column separator character
65 cont [][]string // Table content (rows x columns)
66 colType []int // Column data types (colTypeStr or colTypeFloat)
67 rowLen int // Number of rows
68 colLen int // Number of columns
69 rowFreeze int // Number of frozen header rows (0 or 1)
70 colFreeze int // Number of frozen columns (0 or 1)
71 selectedCell [][]int // Selected cell coordinates
72 mu sync.RWMutex // Mutex for concurrent access
73 interners []*stringInterner // String interners per column (nil if not used)
74 internCols []bool // Track which columns use interning
75 memoryUsage int64 // Current estimated memory usage in bytes
76 maxMemory int64 // Maximum allowed memory in bytes (0 = no limit)
77}
78
79const (
80 // Pre-allocated capacity for rows (optimized for large files)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected