A protocol buffers library for C

Related tags

Utilities pbc
Overview

PBC

travis-ci status

PBC is a google protocol buffers library for C without code generation.

Quick Example

package tutorial;

message Person {
  required string name = 1;
  required int32 id = 2;        // Unique ID number for this person.
  optional string email = 3;

  enum PhoneType {
    MOBILE = 0;
    HOME = 1;
    WORK = 2;
  }

  message PhoneNumber {
    required string number = 1;
    optional PhoneType type = 2 [default = HOME];
  }

  repeated PhoneNumber phone = 4;
}
struct pbc_rmessage * m = pbc_rmessage_new(env, "tutorial.Person", slice);
printf("name = %s\n", pbc_rmessage_string(m , "name" , 0 , NULL));
printf("id = %d\n", pbc_rmessage_integer(m , "id" , 0 , NULL));
printf("email = %s\n", pbc_rmessage_string(m , "email" , 0 , NULL));

int phone_n = pbc_rmessage_size(m, "phone");
int i;

for (i=0;i<phone_n;i++) {
	struct pbc_rmessage * p = pbc_rmessage_message(m , "phone", i);
	printf("\tnumber[%d] = %s\n",i,pbc_rmessage_string(p , "number", i ,NULL));
	printf("\ttype[%d] = %s\n",i,pbc_rmessage_string(p, "type", i, NULL));
}

pbc_rmessage_delete(m);

Message API

You can use wmessage for encoding , and rmessage for decoding.

See test/addressbook.c for details.

Pattern API

If you need better performance , you can use pbc_pattern_xxx api .

See test/pattern.c for details.

Pattern api is faster and less memory used because it can access data in native C struct.

Extension

PBC support extension in a very simple way . PBC add a specific prefix to every extension field name.

Service

Not supported

Enum

With message API , you can use both string and integer as enum type . They must be integer in Pattern API.

Lua bindings

cd binding/lua && make or cd binding/lua53 && make

See https://github.com/cloudwu/pbc/tree/master/binding/lua/README.md

Question ?

Comments
  • 5.1.5版本的Lua绑定代码中,调用luaopen_protobuf_c后栈没有平衡,有table在栈顶

    5.1.5版本的Lua绑定代码中,调用luaopen_protobuf_c后栈没有平衡,有table在栈顶

    调用luaopen_protobuf_c之后,lua_gettop会返回1,建议加上一个lua_pop的调用,以符合 Lua手册中说的好的编程实践.

    Note that the code above is "balanced": at its end, the stack is back to its original configuration. This is considered good programming practice.

    opened by DavidFeng 9
  • protobuf.unpack 无法解析消息中嵌套的对象数组,但protobuf.decode可以成功

    protobuf.unpack 无法解析消息中嵌套的对象数组,但protobuf.decode可以成功

    将您的test.lua做了些微改动之后test.lua代码如下: require "protobuf"

    addr = io.open("../../build/addressbook.pb","rb") buffer = addr:read "*a" addr:close() protobuf.register(buffer)

    addressbook = { name = "Alice", id = 12345, phone = { { number = "1301234567" }, { number = "87654321", type = "WORK" }, } }

    code = protobuf.encode("tutorial.Person", addressbook)

    decode = protobuf.decode("tutorial.Person" , code)

    print(decode.name) print(decode.id) for _,v in ipairs(decode.phone) do print("\t"..v.number, v.type) end

    print("========="); phonebuf = protobuf.pack("tutorial.Person.PhoneNumber number","87654321"); buffer = protobuf.pack("tutorial.Person name id phone", "Alice", 123, { phonebuf }); name,id,phone = protobuf.unpack("tutorial.Person name id phone", buffer); print(name) print(id) for _,v in pairs(phone) do print(v.number, v.type) end

    输出结果如下: Alice 12345 1301234567 HOME

    87654321 WORK

    Alice 123 nil nil

    不知道为什么87654321 WORK会在这个网页上变粗体加大

    opened by sigh667 8
  • import

    import "MessageType.proto";报错.\parser.lua:53: syntax error at [Scene.proto] (8)

    testLogin.lua 文件内容如下: require "protobuf"

    t = parser.register("MessageType.proto","../../test/aa") t = parser.register("Scene.proto","../../test/aa")

    MessageType.proto 文件内容如下: package com.proto.msg; option java_package = "com.proto.msg.common"; option java_outer_classname = "MessageType";

    enum CGMessageType{ CG_START_MOVE = 851; }

    Scene.proto 文件内容如下: package com.proto.msg.scene; option java_package = "com.proto.msg.scene"; option java_outer_classname = "Scene"; import "MessageType.proto";

    message CGStartMove { required int32 x = 1 ; required int32 y = 2 ; }

    我尝试了按顺序注册,但还是报错。如果打成一个pb文件的话,实战中某些pb文件会过大,不利于客户端动态更新

    opened by sigh667 7
  • 空数组共享地址的问题

    空数组共享地址的问题

    定义一个消息结构: package Test;

    // 每一手牌 message CardInfo { optional int32 seatId = 1; repeated int32 cards = 2; }

    message SeatInfo { optional int32 seatId = 2;

    repeated CardInfo histCards = 5;
    

    }

    message GameInfo { optional int32 curSeatId = 6;

    repeated SeatInfo   seatInfo    = 10; // playingUsers
    

    }

    执行以下代码: local protobuf = require "protobuf" protobuf.register_file("protos/Test.pb") local gameInfo = {} gameInfo.seatInfo = {} for i=1,4 do local one = {} gameInfo.seatInfo[i] = one one.seatId = i

        local b = {}
    
        --[[
        b[1] = {}
        b[1].seatId = i
        b[1].cards = {}
        --]]
    
        one.histCards = b
    end
    
    local msg = protobuf.encode("Test.GameInfo", gameInfo)
    gameInfo  = protobuf.decode("Test.GameInfo", msg)
    for i=1,4 do
        print("histCards for ", i, " is ", tostring(gameInfo.seatInfo[i].histCards))
    end
    

    发现所有的histCards都指向同一个地址,把一个元素加到数组里,操作了一个,就会影响所有的histCards: histCards for 1 is table: 0x2b8fc19b4e80 histCards for 2 is table: 0x2b8fc19b4e80 histCards for 3 is table: 0x2b8fc19b4e80 histCards for 4 is table: 0x2b8fc19b4e80

    如果把代码里注释打开,histCards不是空数组,就不会共享地址里。 所以猜测所有的空数组都共享一个空表,如果对这个空表改动,所有别的包里的空数组都有问题了

    opened by ZhouWeikuan 6
  • mingw环境下编译pbc的lua绑定库protobuf会出怪异现象,引用的skynet里lua5.4版本:

    mingw环境下编译pbc的lua绑定库protobuf会出怪异现象,引用的skynet里lua5.4版本:

    修改protobuf.lua里代码如下:

    print("1")
    local c1 = require "protobuf.c"
    local c = {}
    -- c["_env_new"] = function() end
    -- print(c._env_new)
    -- do return end
    for k,v in pairs(c1) do
    	print(k,v)
    	local s = string.format("%s", k)
    	if "_env_new" == s then
    		print(k, type(k), v, type(v))
    		c[k] = v
    	else
    		print("no _env_new", k, type(k), v, type(v))
    	end
    end
    print("for c")
    for k,v in pairs(c) do
    	print(k,v)
    end
    print("ok", c, c._env_new)
    do return end
    

    发现调用c._env_new时会报nil异常,最后定位到是两个字符串内容打印一至,但却不相等,通过string.format复制一份才相等。 其中具体原因看看大家有谁指导下?

    opened by 253980289 5
  • skyent 加了一个protobuf 第一次运行报错了。 风哥看看这是啥原因啊

    skyent 加了一个protobuf 第一次运行报错了。 风哥看看这是啥原因啊

    [email protected] skynet % ./skynet ./examples/config [:01000002] LAUNCH snlua bootstrap [:01000003] LAUNCH snlua launcher [:01000004] LAUNCH snlua cmaster [:01000004] master listen socket 0.0.0.0:2013 [:01000005] LAUNCH snlua cslave [:01000005] slave connect to master 127.0.0.1:2013 [:01000004] connect from 127.0.0.1:55198 4 [:01000006] LAUNCH harbor 1 16777221 [:01000004] Harbor 1 (fd=4) report 127.0.0.1:2526 [:01000005] Waiting for 0 harbors [:01000005] Shakehand ready [:01000007] LAUNCH snlua datacenterd [:01000008] LAUNCH snlua service_mgr [:01000009] LAUNCH snlua testproto [:01000009] lua loader error : error loading module 'protobuf.c' from file './luaclib/protobuf.so': dlopen(./luaclib/protobuf.so, 6): Symbol not found: _lua_newuserdatauv Referenced from: ./luaclib/protobuf.so Expected in: flat namespace in ./luaclib/protobuf.so stack traceback: [C]: in ? [C]: in function 'require' ./lualib/protobuf.lua:1: in main chunk [C]: in function 'require' ./test/testproto.lua:2: in local 'main' ./lualib/loader.lua:48: in main chunk [:01000009] KILL self [:01000002] KILL self

    opened by GameKong 5
  • test/addressbook.c内存泄漏

    test/addressbook.c内存泄漏

    内存泄漏发生的位置是test_wmessage函数内对phone的操作, repeated字段。测试了一下,

    struct pbc_wmessage * phone = pbc_wmessage_message(msg , "phone"); pbc_wmessage_string(phone , "number", "87654321" , -1); 调用一次没有问题, 接下来, 再次调用pbc_wmessage_string就会出现内存泄漏

    ==10504== 8 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==10504== at 0x402BE68: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==10504== by 0x8048871: _pbcM_malloc (in /home/van9ogh/Desktop/mr/tmp/pbc/test/a.out) ==10504== by 0x8051E5A: pbc_wmessage_string (in /home/van9ogh/Desktop/mr/tmp/pbc/test/a.out) ==10504== by 0x8052DEC: test_wmessage (in /home/van9ogh/Desktop/mr/tmp/pbc/test/a.out) ==10504== by 0x8052F18: main (in /home/van9ogh/Desktop/mr/tmp/pbc/test/a.out) ==10504== ==10504== LEAK SUMMARY: ==10504== definitely lost: 8 bytes in 1 blocks ==10504== indirectly lost: 0 bytes in 0 blocks ==10504== possibly lost: 0 bytes in 0 blocks ==10504== still reachable: 0 bytes in 0 blocks ==10504== suppressed: 0 bytes in 0 blocks

    opened by ahappyforest 5
  • macos下编译binding lua53错误。

    macos下编译binding lua53错误。

    macos 10.12 brew安装的 lua53, protobuf (3.3.2) 编译 pbc是没有问题的,只是测试test的时候,提示 Please use 'syntax = "proto2";' or 'syntax = "proto3";' 而已 编译binding/lua53的时候,Makefile文件已经修改了 lua53的 include路径

    gcc -O2 -fPIC -Wall -shared -o protobuf.so -I../.. -I/usr/local/Cellar/lua53/5.3.1_1/include/lua5.3 -L../../build pbc-lua53.c -lpbc Undefined symbols for architecture x86_64: "_luaL_buffinit", referenced from: __pattern_pack in pbc-lua53-608caf.o "_luaL_checkinteger", referenced from: __rmessage_new in pbc-lua53-608caf.o __rmessage_int in pbc-lua53-608caf.o __rmessage_real in pbc-lua53-608caf.o __pattern_unpack in pbc-lua53-608caf.o __pattern_pack in pbc-lua53-608caf.o __decode in pbc-lua53-608caf.o 。。。。。。 。。。。。。 。。。。。。(类似错误提示) "_lua_type", referenced from: __env_type in pbc-lua53-bd02ca.o __pattern_pack in pbc-lua53-bd02ca.o __decode in pbc-lua53-bd02ca.o _decode_cb in pbc-lua53-bd02ca.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [protobuf.so] Error 1

    有点方,搜索了一些,没找到合适的解决。难道是编译pbc的时候需要?

    opened by feihuroger 4
  • Fix writing dirty data to default table

    Fix writing dirty data to default table

    1. [FIX] compile error of lua 5.1 binding in MINGW
    2. [FIX] changing empty decoded table will change the default table of related type

    ISSUE#27 有关 我加了一个如果解包的数据没有某个字段,会判定一次默认的table里的数据,如果类型是table会额外创建一个新table和metatable以防止写坏默认table。麻烦 @cloudwu 看看这个额外消耗是否可接受?因为如果解包的数据里有这个字段的话,只读性能是不会受到影响的(其实我觉得返回nil可能更好但是为了兼容以前的语义)

    另外想了一下,这个metatable是可以缓存并且被多个默认的空实例共用的。但是这样会多一张缓存表和每次会执行查找操作,我不确定这个查找和新建一个{ __index = default_inst[key] }哪个消耗更高,所以先用了这种简单直接一些的方式。

    另外,修改的 testparser.lua 的代码在修改前的输出是

    $ lua5.1 testparser.lua
    ID: 12345, Name: Alice, Email: [email protected]
            Nickname: AHA, Icon: id:1
            Phone NO.1:       1301234567 HOME
            Phone NO.2:         87654321 WORK
            Phone NO.3:      13912345678 MOBILE
    ID: 12346, Name: Bob, Email:
            Nickname: AHA, Icon: id:1
            Phone NO.1:       1301234568 HOME
            Phone NO.2:         98765432 HOME
            Phone NO.3:      13998765432 MOBILE
    Alice   123
    Phone:      18612345678 HOME
    

    很明显,第二个地址簿的Profile字段不应该有内容 修改后的输出是

    $ lua5.1 testparser.lua
    ID: 12345, Name: Alice, Email: [email protected]
            Nickname: AHA, Icon: id:1
            Phone NO.1:       1301234567 HOME
            Phone NO.2:         87654321 WORK
            Phone NO.3:      13912345678 MOBILE
    ID: 12346, Name: Bob, Email:
            Nickname: , Icon:
            Phone NO.1:       1301234568 HOME
            Phone NO.2:         98765432 HOME
            Phone NO.3:      13998765432 MOBILE
    Alice   123
    Phone:      18612345678 HOME
    

    我本地测试环境是MSYS2/MINGW64: lua5.1

    再另外, ISSUE#27的情况我手动也测试过了,不会再写脏数据了。但是没有贴上来,用testparser.lua的代码改一下也很容易构造。我就不贴了。

    这个BUG导致我们客户端的判定逻辑很复杂,必须先foreach枚举key才能知道这个字段是否可用,导致非常容易遗漏然后产生其他不太容易预料的结果。

    麻烦评估一下这个Fix,谢谢。

    opened by owent 4
  • Using lua protobuf.so for iOS

    Using lua protobuf.so for iOS

    I've been trying to make your protobuf working for iOS. At first I couldn't compile on Mac OS X but figured it out by adding dynamic_lookup into CFLAGS. Think you could add this as an option for Mac OS X build

    But when I loaded using protobuf.lua in my iOS game (running quick-cocos2dx which is lua) I got this error:

    [LUA ERROR] error loading module 'protobuf.c' from file '/usr/local/lib/lua/5.1/protobuf.so': dlopen(/usr/local/lib/lua/5.1/protobuf.so, 2): no suitable image found. Did find: /usr/local/lib/lua/5.1/protobuf.so: mach-o, but not built for iOS simulator

    Any ideas?

    opened by deathemperor 4
  • not support import  another .proto?

    not support import another .proto?

    lua: ./protobuf.lua:545: register fail stack traceback: [C]: in function '_env_register' ./protobuf.lua:545: in function 'register' test2.lua:6: in main chunk [C]: ?

    opened by swors 4
  •  SEGV issue detected in pbc_wmessage_integer src/wmessage.c:137

    SEGV issue detected in pbc_wmessage_integer src/wmessage.c:137

    A SEGV has occurred when running program test. The program does not check for the return value of pbc_wmessage_new (./test/test.c:16), resulting in the program still running when null is returned.

    POC file:

    https://github.com/HotSpurzzZ/testcases/blob/main/pbc/pbc_wmessage_integer_testcase

    Verification steps :

    1.Get the source code of pbc 2.Compile (Note the modification of the makefile to use AddressSanitizer) cd pbc make 3.use poc and run test mv $poc test.pb ./test

    AddressSanitizer output :

    =================================================================
    ==10511==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x560d341408e6 bp 0x00000000007b sp 0x7ffdc783c030 T0)
    ==10511==The signal is caused by a READ memory access.
    ==10511==Hint: address points to the zero page.
        #0 0x560d341408e6 in pbc_wmessage_integer src/wmessage.c:137
        #1 0x560d34136ec9 in test ../test/test.c:21
        #2 0x560d34136931 in main ../test/test.c:39
        #3 0x7fde58430d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
        #4 0x7fde58430e3f in __libc_start_main_impl ../csu/libc-start.c:392
        #5 0x560d34136c94 in _start (/root/Desktop/pbc/build/test+0x3c94)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV src/wmessage.c:137 in pbc_wmessage_integer
    ==10511==ABORTING
    opened by HotSpurzzZ 0
  • 在lua中修改的uint64字段字段,经过一次encode之后,又变回了原来的值,感觉没有修改成功,请云风大大看看怎么回事哈

    在lua中修改的uint64字段字段,经过一次encode之后,又变回了原来的值,感觉没有修改成功,请云风大大看看怎么回事哈

    代码如下: LuaLogDebug("LastLoginTime3==================", tData.playerInfo.LastLoginTime) local strPbData = protobuf.encode("UserProfile", tData)

    LuaLogDebug("LastLoginTime4==================", tData.playerInfo.LastLoginTime) 输出结构如下: 2022-03-31 11:11:12|140067794106112|DEBUG|common/DBInterface.lua:67|LastLoginTime3==================|1648696272 2022-03-31 11:11:12|140067794106112|DEBUG|common/DBInterface.lua:70|LastLoginTime4==================|1646828625

    pb的结构如下:

    message PlayerInfoModel { optional int32 level = 1; optional int32 languageID = 2; optional int32 clothMoney = 3; repeated KeyValue_IntInt limitCoin = 4;//废弃 optional int32 coin = 5; optional int32 star = 6; optional int32 hp = 7; optional int32 petID = 8; optional int32 dayNight = 9; optional uint64 checkPowerCoinTime = 10; optional string nickname = 11; optional int32 sex = 12; optional string head = 13;//当前使用的头像 optional string accountname = 14; optional int32 levelTryedTimes = 15; optional int32 nicknameNeedCheck = 16; optional string oldNickname = 17; repeated string fbOpenIDs = 18; optional int32 accountType = 19; optional int32 allowMaxlevel = 20; optional string intlOs = 21; optional uint64 LastLoginTime = 22; optional int32 rankReported = 23; optional string RegionName = 24 };

    opened by hilberthu 1
  • 编译binding/lua53时报错

    编译binding/lua53时报错

    CentOS 8.2 gcc -O2 -fPIC -Wall -shared -o protobuf.so -I../.. -I/usr/local/include -L../../build pbc-lua53.c -lpbc /usr/bin/ld: 找不到 -lpbc collect2: 错误:ld 返回 1 make: *** [Makefile:13:protobuf.so] 错误 1

    opened by Wattttz 3
  • bug fix

    bug fix

    example:

    test.lua

    addressbook = {
    	name = "Alice",
    	id = 12345,
    	phone = {
    		{ number = "1301234567" },
    		{ number = "87654321", type = "WORK" },
    	}
    }
    

    [email protected]:/usr/src/pbc/binding/lua53# lua test.lua test/addressbook.proto tutorial Profile nick_name [1] LABEL_OPTIONAL icon [2] LABEL_OPTIONAL Person name [1] LABEL_REQUIRED id [2] LABEL_REQUIRED email [3] LABEL_OPTIONAL phone [4] LABEL_REPEATED test [5] LABEL_REPEATED profile [6] LABEL_OPTIONAL Ext AddressBook person [1] LABEL_REPEATED Alice 12345 1301234567 HOME 87654321 WORK Alice 123 table: 0xaaaaf4c2eed0

    ---------------------split line-----------------------------

    modify test.lua with:

    addressbook = {
    	name = "Alice",
    	id = 12345,
    	phone = {
    		{ number = "1301234567" },
    		{ number = "87654321", type = "WORK" },
    	},
    	c = 3,     -- <-i'm here
    }
    

    [email protected]:/usr/src/pbc/binding/lua53# lua test.lua test/addressbook.proto tutorial Profile nick_name [1] LABEL_OPTIONAL icon [2] LABEL_OPTIONAL Person name [1] LABEL_REQUIRED id [2] LABEL_REQUIRED email [3] LABEL_OPTIONAL phone [4] LABEL_REPEATED test [5] LABEL_REPEATED profile [6] LABEL_OPTIONAL Ext AddressBook person [1] LABEL_REPEATED lua: ./protobuf.lua:308: c stack traceback: [C]: in function 'assert' ./protobuf.lua:308: in metamethod '__index' ./protobuf.lua:217: in upvalue 'encode_message' ./protobuf.lua:324: in function 'protobuf.encode' test.lua:35: in main chunk [C]: in ?

    opened by hanjingo 2
  • Error : rmessage decode context error

    Error : rmessage decode context error

    Hi! Can I ask you something? I am using your pbс project. Everything is fine works fine, there are problems if the buffer size increase 700 bytes stopped not working, outputs an error!

    Error : rmessage decode context error

    dump hex: buffer size=1006

    08 03 12 02 08 00 22 91 08 08 01 12 8C 08 0A 11 ......"......... 0A 07 08 E5 0F 10 01 18 10 12 06 08 12 10 2E 18 ................ 39 10 2E 1A 1E 0A 02 38 00 12 0B 08 02 10 01 1A 9......8........ 05 08 B4 01 10 00 12 0B 08 00 10 01 1A 05 08 B4 ................ 01 10 00 1A 11 0A 02 36 00 12 0B 08 00 10 01 1A .......6........ 05 08 DE 02 10 00 1A 1C 0A 02 34 00 12 0A 08 02 ..........4..... 10 01 1A 04 08 44 10 00 12 0A 08 00 10 01 1A 04 .....D.......... 08 62 10 00 1A 1D 0A 02 33 00 12 0B 08 02 10 03 .b......3....... 1A 05 08 98 07 10 00 12 0A 08 00 10 01 1A 04 08 ................ 19 10 00 1A 1D 0A 02 32 00 12 0B 08 02 10 02 1A .......2........ 05 08 92 04 10 00 12 0A 08 00 10 01 1A 04 08 50 ...............P 10 00 1A 39 0A 02 31 00 12 0B 08 03 10 05 1A 05 ...9..1......... 08 F9 01 10 00 12 0D 08 02 10 F6 03 1A 06 08 E7 ................ D8 01 10 00 12 0B 08 01 10 05 1A 05 08 92 02 10 ................ 00 12 0A 08 00 10 01 1A 04 08 32 10 00 1A 11 0A ..........2..... 02 35 00 12 0B 08 02 10 01 1A 05 08 DE 02 10 00 .5.............. 1A 12 0A 03 37 39 34 12 0B 08 02 10 01 1A 05 08 ....794......... AC 02 10 00 22 0B 08 00 10 06 1A 05 08 8F 06 10 ...."........... 00 22 0D 08 02 10 FF 03 1A 06 08 93 EB 01 10 00 .".............. 22 0B 08 01 10 05 1A 05 08 92 02 10 00 22 0B 08 "............".. 03 10 05 1A 05 08 F9 01 10 00 2A 0B 08 02 10 64 ..............d 1A 05 08 BE 0B 10 00 2A 0A 08 01 10 01 1A 04 08 ............... 0E 10 46 2A 0A 08 03 10 01 1A 04 08 0E 10 46 32 ..F*..........F2 0B 08 02 10 64 1A 05 08 A0 06 10 00 32 0A 08 01 ....d.......2... 10 01 1A 04 08 08 10 00 32 0A 08 03 10 01 1A 04 ........2....... 08 08 10 00 3A 0B 08 00 10 06 1A 05 08 8F 06 10 ....:........... 00 3A 0D 08 02 10 FF 03 1A 06 08 F5 E5 01 10 00 .:.............. 3A 0B 08 01 10 05 1A 05 08 8B 02 10 1E 3A 0B 08 :............:.. 03 10 05 1A 05 08 F2 01 10 1E 42 28 08 00 10 E0 ..........B(.... 5D 1A 0F 08 00 12 05 08 8F 06 10 00 1A 04 08 5D ]..............] 10 60 1A 10 08 02 12 05 08 83 17 10 00 1A 05 08 .`.............. E1 02 10 40 42 18 08 00 10 C0 3E 1A 11 08 02 12 [email protected]>..... 06 08 FD C8 01 10 00 1A 05 08 8A 10 10 00 42 39 ..............B9 08 00 10 90 4E 1A 10 08 02 12 05 08 93 0B 10 00 ....N........... 1A 05 08 8E 01 10 46 1A 0F 08 01 12 05 08 92 02 ......F......... 10 00 1A 04 08 1B 10 28 1A 0F 08 03 12 05 08 F9 .......(........ 01 10 00 1A 04 08 18 10 5A 4A 0A 08 02 12 06 08 ........ZJ...... A9 C0 2A 10 3C 4A 0A 08 00 12 06 08 A9 88 01 10 ...<J.......... 00 4A 09 08 01 12 05 08 E8 07 10 00 52 5C 08 02 .J..........R.. 10 EA 03 18 67 22 06 08 93 EB 01 10 00 2A 0C 08 ....g"......... 00 12 06 08 FA B1 01 10 00 18 67 2A 0B 08 01 12 ..........g*.... 05 08 98 75 10 00 18 64 2A 0B 08 02 12 05 08 C8 ...u...d*....... 65 10 00 18 64 2A 0B 08 03 12 05 08 D8 36 10 00 e...d*.......6.. 18 64 30 00 3A 05 08 BE 0B 10 00 42 05 08 A0 06 .d0.:......B.... 10 00 4A 06 08 9F D8 01 10 00 52 2E 08 00 10 09 ..J.......R..... 18 01 22 05 08 8F 06 10 00 2A 0B 08 00 12 05 08 .."............ 8F 06 10 00 18 01 30 00 3A 04 08 00 10 00 42 04 ......0.:.....B. 08 00 10 00 4A 04 08 00 10 00 52 55 08 01 10 02 ....J.....RU.... 18 01 22 05 08 92 02 10 00 2A 0B 08 00 12 05 08 .."............ C8 01 10 00 18 01 2A 0B 08 01 12 05 08 96 01 10 ............... 00 18 01 2A 0B 08 02 12 05 08 82 01 10 00 18 01 ............... 2A 0A 08 03 12 04 08 46 10 00 18 01 30 00 3A 04 ......F....0.:. 08 0E 10 46 42 04 08 08 10 00 4A 05 08 94 02 10 ...FB.....J..... 00 52 55 08 03 10 01 18 01 22 05 08 F9 01 10 00 .RU......"...... 2A 0B 08 00 12 05 08 C8 01 10 00 18 01 2A 0B 08 .............. 01 12 05 08 96 01 10 00 18 01 2A 0B 08 02 12 05 ............... 08 82 01 10 00 18 01 2A 0A 08 03 12 04 08 46 10 .......*......F. 00 18 01 30 00 3A 04 08 0E 10 46 42 04 08 08 10 ...0.:....FB.... 00 4A 05 08 AD 02 10 00 5A 0C 08 00 10 01 18 00 .J......Z....... 22 04 08 00 10 00 5A 0C 08 01 10 06 18 00 22 04 ".....Z.......". 08 00 10 00 6A 06 08 AF 8D 1D 10 00 72 0A 0A 06 ....j.......r... 08 9D E5 01 10 00 10 00 7A 0A 08 02 12 06 08 BC ........z....... AB 2C 10 3C 7A 0A 08 00 12 06 08 B8 8E 01

    opened by murat8505 2
Owner
云风
coder ( c , lua , open source )
云风
A protocol framework for ZeroMQ

zproto - a protocol framework for ZeroMQ Contents Man Page The Codec Generator The Server Generator Quick Background The State Machine Model The zprot

The ZeroMQ project 224 Sep 18, 2022
Isocline is a pure C library that can be used as an alternative to the GNU readline library

Isocline: a portable readline alternative. Isocline is a pure C library that can be used as an alternative to the GNU readline library (latest release

Daan 134 Nov 10, 2022
A linux library to get the file path of the currently running shared library. Emulates use of Win32 GetModuleHandleEx/GetModuleFilename.

whereami A linux library to get the file path of the currently running shared library. Emulates use of Win32 GetModuleHandleEx/GetModuleFilename. usag

Blackle Morisanchetto 3 Sep 24, 2022
Command-line arguments parsing library.

argparse argparse - A command line arguments parsing library in C (compatible with C++). Description This module is inspired by parse-options.c (git)

Yecheng Fu 525 Nov 19, 2022
A cross platform C99 library to get cpu features at runtime.

cpu_features A cross-platform C library to retrieve CPU features (such as available instructions) at runtime. Table of Contents Design Rationale Code

Google 2.2k Nov 29, 2022
Library that solves the exact cover problem using Dancing Links, also known as DLX.

The DLX Library The DLX library The DLX library solves instances of the exact cover problem, using Dancing Links (Knuth’s Algorithm X). Also included

Ben Lynn 43 Nov 7, 2022
Standards compliant, fast, secure markdown processing library in C

Hoedown Hoedown is a revived fork of Sundown, the Markdown parser based on the original code of the Upskirt library by Natacha Porté. Features Fully s

Hoedown 920 Nov 26, 2022
CommonMark parsing and rendering library and program in C

cmark cmark is the C reference implementation of CommonMark, a rationalized version of Markdown syntax with a spec. (For the JavaScript reference impl

CommonMark 1.4k Nov 20, 2022
Platform independent Near Field Communication (NFC) library

*- * Free/Libre Near Field Communication (NFC) library * * Libnfc historical contributors: * Copyright (C) 2009 Roel Verdult * Copyright (C) 2009

null 1.3k Nov 29, 2022
A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.

libpostal: international street address NLP libpostal is a C library for parsing/normalizing street addresses around the world using statistical NLP a

openvenues 3.6k Nov 23, 2022
Your friendly e-mail address validation library.

libvldmail Your friendly e-mail address validation library. Why? Did you know that parentheses, spaces and - according to the RFC 6531 document - emoj

Cthulhux 47 Sep 28, 2022
An easy-to-use C library for displaying text progress bars.

What is this thing? progressbar is a C-class (it's a convention, dammit) for displaying attractive progress bars on the command line. It's heavily inf

Trevor Fountain 439 Nov 9, 2022
Library for writing text-based user interfaces

IMPORTANT This library is no longer maintained. It's pretty small if you have a big project that relies on it, just maintain it yourself. Or look for

null 1.9k Nov 23, 2022
Locate the current executable and the current module/library on the file system

Where Am I? A drop-in two files library to locate the current executable and the current module on the file system. Supported platforms: Windows Linux

Gregory Pakosz 380 Nov 20, 2022
A small and portable INI file library with read/write support

minIni minIni is a portable and configurable library for reading and writing ".INI" files. At just below 900 lines of commented source code, minIni tr

Thiadmer Riemersma 287 Nov 22, 2022
Small configuration file parser library for C.

libConfuse Introduction Documentation Examples Build & Install Origin & References Introduction libConfuse is a configuration file parser library writ

null 416 Nov 19, 2022
Libelf is a simple library to read ELF files

libelf Libelf is a simple library which provides functions to read ELF files. Headers #include <stdint.h> #include <elf.h> Structures typedef struct

David du Colombier 44 Aug 7, 2022
Universal configuration library parser

LIBUCL Table of Contents generated with DocToc Introduction Basic structure Improvements to the json notation General syntax sugar Automatic arrays cr

Vsevolod Stakhov 1.5k Nov 19, 2022
The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.

libxo libxo - A Library for Generating Text, XML, JSON, and HTML Output The libxo library allows an application to generate text, XML, JSON, and HTML

Juniper Networks 252 Nov 20, 2022