code: int readBits(final int count) {
          if (count < 0 || count > 32) {
              throw new IllegalArgumentException("count: " + count + " (expected: 0-32 )");
          }
          int bitCount = this.bitCount;
          long bitBuffer = this.bitBuffer;
  
          if (bitCount < count) {
              long readData;
              int offset;
              switch (in.readableBytes()) {
                  case 1: {
                      readData = in.readUnsignedByte();
                      offset = 8;
                      break;
                  }
                  case 2: {
                      readData = in.readUnsignedShort();
                      offset = 16;
                      break;
                  }
                  case 3: {
                      readData = in.readUnsignedMedium();
                      offset = 24;
                      break;
                  }
                  default: {
                      readData = in.readUnsignedInt();
                      offset = 32;
                      break;
                  }
              }
  
              bitBuffer = bitBuffer << offset | readData;
              bitCount += offset;
              this.bitBuffer = bitBuffer;
          }
  
          this.bitCount = bitCount -= count;
          return (int) (bitBuffer >>> bitCount & (count != 32 ? (1 << count) - 1 : 0xFFFFFFFFL));
      }
docs: Reads up to 32 bits from the {@link ByteBuf}.
  @param count The number of bits to read (maximum {@code 32} as a size of {@code int})
  @return The bits requested, right-aligned within the integer