docs: public byte[] toBytes()
    {
      readWriteLock.readLock().lock();
  
      try {
        int nonEmptyBuckets = getNonEmptyBucketCount();
        if (nonEmptyBuckets < (numBuckets / 2)) {
          return toBytesSparse(nonEmptyBuckets);
        } else {
          return toBytesFull(true);
        }
      }
      finally {
        readWriteLock.readLock().unlock();
      }
    }