فك الترميز باستخدام بروتوبوف

يُفكّك الإدخال باستخدام “Protobuf” وفقًا للمعيار المقابل.

المدخلات: نص (UTF-8) / ملفالنتيجة: JSON منظّم

or drop a file here

إدخال نصي

شغّل الأداة لعرض النتيجة

أدخل مخطط .proto الذي يعرّف أنواع الرسائل وأسماء الحقول.

أمثلة

Turn the official three-byte Protobuf message into a named field — step 1

Show how 08 is a field tag and 96 01 represents 150; the schema supplies the field name.

المدخلات

e2e691f1c279e8c9-protobuf-int.bin

3 bytes

تنزيل

Expected answer

JSON
{
    "a": 150
}
مخطط (.proto نص)
syntax="proto3"; message Test1 { int32 a = 1; }
عرض الحقول غير المعروفة
Off
عرض الأنواع
Off
Recover a length-delimited string from a Protobuf message

Explain the distinction between a byte count and the seven actual UTF-8 bytes of testing.

المدخلات

991bc2c954f9cede-protobuf-string.bin

9 bytes

تنزيل

Expected answer

JSON
{
    "b": "testing"
}
مخطط (.proto نص)
syntax="proto3"; message Test2 { string b = 2; }
عرض الحقول غير المعروفة
Off
عرض الأنواع
Off
Decode the same Protobuf bytes as either 3 or minus 2 — step 1

Demonstrate why a wire payload alone does not determine signedness or an application schema.

المدخلات

2d88972e9536ba54-protobuf-zigzag.bin

2 bytes

تنزيل

Expected answer

JSON
{
    "a": 3
}
مخطط (.proto نص)
syntax="proto3"; message Test { int32 a = 1; }
عرض الحقول غير المعروفة
Off
عرض الأنواع
Off
Decode the same Protobuf bytes as either 3 or minus 2 — step 2

Demonstrate why a wire payload alone does not determine signedness or an application schema.

المدخلات

2d88972e9536ba54-protobuf-zigzag.bin

2 bytes

تنزيل

Expected answer

JSON
{
    "a": -2
}
مخطط (.proto نص)
syntax="proto3"; message Test { sint32 a = 1; }
عرض الحقول غير المعروفة
Off
عرض الأنواع
Off
full schema, no unknown fields

المدخلات

b2c113c637acb1525da1aaec.bin

37 bytes

تنزيل

Expected answer

JSON
{
    "Apple": [
        28
    ],
    "Carrot": [
        "Me"
    ],
    "Banana": "You",
    "Date": 43,
    "Elderberry": {
        "Fig": "abc123",
        "Grape": {}
    },
    "Huckleberry": 255
}
مخطط (.proto نص)
message Test { repeated fixed32 Apple = 1; optional string Banana = 2; repeated string Carrot = 3; optional int32 Date = 4; optional subTest Elderberry = 5; optional fixed64 Huckleberry = 6; } message subTest { optional string Fig = 1; optional subSubTest Grape = 2; } message subSubTest {}
عرض الحقول غير المعروفة
Off
عرض الأنواع
Off
no schema

المدخلات

70b628f90be58e846d45b8cd.bin

28 bytes

تنزيل

Expected answer

JSON
{
    "1": 28,
    "2": "You",
    "3": "Me",
    "4": 43,
    "5": {
        "1": "abc123",
        "2": {}
    }
}
مخطط (.proto نص)
(empty)
عرض الحقول غير المعروفة
Off
عرض الأنواع
Off
partial schema, no unknown fields

المدخلات

70b628f90be58e846d45b8cd.bin

28 bytes

تنزيل

Expected answer

JSON
{
    "Apple": [
        28
    ],
    "Carrot": [
        "Me"
    ],
    "Banana": "You"
}
مخطط (.proto نص)
message Test { repeated fixed32 Apple = 1; optional string Banana = 2; repeated string Carrot = 3; }
عرض الحقول غير المعروفة
Off
عرض الأنواع
Off
partial schema, show unknown fields

المدخلات

70b628f90be58e846d45b8cd.bin

28 bytes

تنزيل

Expected answer

JSON
{
    "Test": {
        "Apple": [
            28
        ],
        "Carrot": [
            "Me"
        ],
        "Banana": "You"
    },
    "Unknown Fields": {
        "4": 43,
        "5": {
            "1": "abc123",
            "2": {}
        }
    }
}
مخطط (.proto نص)
message Test { repeated fixed32 Apple = 1; optional string Banana = 2; repeated string Carrot = 3; }
عرض الحقول غير المعروفة
On
عرض الأنواع
Off
partial schema, show unknown fields, show types

المدخلات

60197322fa669ab113373c89.bin

39 bytes

تنزيل

Expected answer

JSON
{
    "Test": {
        "Carrot (string)": [
            "Me"
        ],
        "Banana (string)": "You",
        "Date (int32)": 43,
        "Imbe (Options)": "Option1"
    },
    "Unknown Fields": {
        "field #1: 32-Bit (e.g. fixed32, float)": 28,
        "field #5: L-delim (e.g. string, message)": {
            "field #1: L-delim (e.g. string, message)": "abc123",
            "field #2: L-delim (e.g. string, message)": {}
        },
        "field #6: 64-Bit (e.g. fixed64, double)": 3029774971578
    }
}
مخطط (.proto نص)
message Test { optional string Banana = 2; repeated string Carrot = 3; optional int32 Date = 4; optional Options Imbe = 7; } message subTest { optional string Fig = 1; optional subSubTest Grape = 2; } message subSubTest {} enum Options { Option0 = 0; Option1 = 1; Option2 = 2; }
عرض الحقول غير المعروفة
On
عرض الأنواع
On

أدوات ذات صلة

الشبكات

مرجع العملية

عرض الوثائق التقنية الأصلية (English)