         }
     }
 
-    // Throws at end-of-input or if broken varint
-    private mutating func getRawVarint() throws -> UInt64 {
+    /// Private: Parse the next raw varint from the input.
+    private mutating func decodeVarint() throws -> UInt64 {
         if available < 1 {
             throw DecodingError.truncatedInput
         }

        }
    }

    // Jump to end of current field.
    //
    // This uses the bookmarked position saved by the last call to getTagType().
    // On exit, fieldStartP points to the first byte of the tag, fieldEndP points
    // to the first byte after the field contents.
    //
    private mutating func skip() throws {
        if let end = fieldEndP {
            p = end
        } else {
            available += p - fieldStartP
            p = fieldStartP
            guard let tag = try getTagWithoutUpdatingFieldStart() else {

        consume(length: 8)
    }

    /// Private: Get the start and length for the body of
    // a length-delimited field.
    private mutating func getFieldBodyBytes(count: inout Int) throws -> UnsafePointer<UInt8> {
        let length = try decodeVarint()
        if length <= UInt64(available) {
            count = Int(length)
            let body = p
