package iox // GetChunkLen returns the current chunk size/length in bytes. func (c *ChunkLocker) GetChunkLen() (size uint) { c.lock.RLock() defer c.lock.RUnlock() size = c.chunkLen return } // SetChunkLen sets the current chunk size/length in bytes. func (c *ChunkLocker) SetChunkLen(size uint) (err error) { if size == 0 { err = ErrInvalidChunkSize return } c.lock.Lock() defer c.lock.Unlock() c.chunkLen = size return }