code: void bufferIt(BufferedOutputStream outStream, int code, int size) throws IOException {
          int PutBuffer = code;
          int PutBits = bufferPutBits;
  
          PutBuffer &= (1 << size) - 1;
          PutBits += size;
          PutBuffer <<= 24 - PutBits;
          PutBuffer |= bufferPutBuffer;
  
          while (PutBits >= 8) {
              int c = ((PutBuffer >> 16) & 0xFF);
              outStream.write(c);
              if (c == 0xFF) {
                  outStream.write(0);
              }
              PutBuffer <<= 8;
              PutBits -= 8;
          }
          bufferPutBuffer = PutBuffer;
          bufferPutBits = PutBits;
  
      }
docs: and sends them to outStream by the byte.