     var d = Self()
     while true {
       switch d.parseOne(&input) {
-      case let .valid(bufferStorage, length: length):
-        output(scalar(bufferStorage: bufferStorage, length: length))
+      case let .valid(scalarContent):
+        output(decodeOne(scalarContent))
       case .invalid:
         if !makeRepairs { return 1 }
         errors += 1


  mutating func parseOne<I : IteratorProtocol>(
    _ input: inout I
  ) -> Unicode.ParseResult<UInt32> where I.Element == CodeUnit

  static func scalar(bufferStorage: UInt32, length: Int) -> UnicodeScalar
}

extension UnicodeDecoder {

    return 1
  }
  
  public static func decodeOne(_ encodedScalar: Buffer) -> UnicodeScalar {
    let bits = encodedScalar._storage
    switch encodedScalar._bitCount {
    case 8:
      return UnicodeScalar(_unchecked: bits)
    case 16:
      var value = (bits & 0b0_______________________11_1111__0000_0000) &>> 8
      value    |= (bits & 0b0________________________________0001_1111) &<< 6
      return UnicodeScalar(_unchecked: value)
    case 24:
      var value = (bits & 0b0____________11_1111__0000_0000__0000_0000) &>> 16
      value    |= (bits & 0b0_______________________11_1111__0000_0000) &>> 2
      value    |= (bits & 0b0________________________________0000_1111) &<< 12
      return UnicodeScalar(_unchecked: value)
    default:
      _sanityCheck(encodedScalar.count == 4)
      var value = (bits & 0b0_11_1111__0000_0000__0000_0000__0000_0000) &>> 24
      value    |= (bits & 0b0____________11_1111__0000_0000__0000_0000) &>> 10
      value    |= (bits & 0b0_______________________11_1111__0000_0000) &<< 4
      value    |= (bits & 0b0________________________________0000_0111) &<< 18
      return UnicodeScalar(_unchecked: value)
    }
  }
