github.com/segmentio/parquet-go@v0.0.0-20230712180008-5d42db8f0d47/page_max.go (about) 1 package parquet 2 3 import ( 4 "bytes" 5 ) 6 7 func maxFixedLenByteArray(data []byte, size int) (max []byte) { 8 if len(data) > 0 { 9 max = data[:size] 10 11 for i, j := size, 2*size; j <= len(data); { 12 item := data[i:j] 13 14 if bytes.Compare(item, max) > 0 { 15 max = item 16 } 17 18 i += size 19 j += size 20 } 21 } 22 return max 23 }