code: void writeBits(ByteBuf out, final int count, final long value) {
          if (count < 0 || count > 32) {
              throw new IllegalArgumentException("count: " + count + " (expected: 0-32)");
          }
          int bitCount = this.bitCount;
          long bitBuffer = this.bitBuffer | value << 64 - count >>> bitCount;
          bitCount += count;
  
          if (bitCount >= 32) {
              out.writeInt((int) (bitBuffer >>> 32));
              bitBuffer <<= 32;
              bitCount -= 32;
          }
          this.bitBuffer = bitBuffer;
          this.bitCount = bitCount;
      }
docs: Writes up to 32 bits to the output {@link ByteBuf}.
  @param count The number of bits to write (maximum {@code 32} as a size of {@code int})
  @param value The bits to write