package parquet

import 

type bitmap struct {
	bits []uint64
}

func ( *bitmap) ( int) {
	 = ( + 63) / 64
	if cap(.bits) <  {
		.bits = make([]uint64, , 2*)
	} else {
		.bits = .bits[:]
		.clear()
	}
}

func ( *bitmap) () {
	for  := range .bits {
		.bits[] = 0
	}
}

var (
	bitmapPool sync.Pool // *bitmap
)

func acquireBitmap( int) *bitmap {
	,  := bitmapPool.Get().(*bitmap)
	if  == nil {
		 = &bitmap{bits: make([]uint64, , 2*)}
	} else {
		.reset()
	}
	return 
}

func releaseBitmap( *bitmap) {
	if  != nil {
		bitmapPool.Put()
	}
}