github.com/segmentio/parquet-go@v0.0.0-20230712180008-5d42db8f0d47/bloom/block.go (about) 1 package bloom 2 3 import "unsafe" 4 5 // Word represents 32 bits words of bloom filter blocks. 6 type Word uint32 7 8 // Block represents bloom filter blocks which contain eight 32 bits words. 9 type Block [8]Word 10 11 // Bytes returns b as a byte slice. 12 func (b *Block) Bytes() []byte { 13 return unsafe.Slice((*byte)(unsafe.Pointer(b)), BlockSize) 14 } 15 16 const ( 17 // BlockSize is the size of bloom filter blocks in bytes. 18 BlockSize = 32 19 20 salt0 = 0x47b6137b 21 salt1 = 0x44974d91 22 salt2 = 0x8824ad5b 23 salt3 = 0xa2b7289d 24 salt4 = 0x705495c7 25 salt5 = 0x2df1424b 26 salt6 = 0x9efc4947 27 salt7 = 0x5c6bfb31 28 )