A C++11 ASN.1 BER Encoding and Decoding Library

Overview

fast_ber version Appveyor status Travis status C++11 C++14 C++17 C++20 clang-format

A performant ASN.1 BER encoding and decoding library written in C++11

Introduction

fast_ber is a small, lightweight library for BER encoding and decoding. Fast ber forgoes some tight ASN.1 specification conformance to provide fast encoding and decoding performance in common use cases

Design Decisions

  • Simple, modern C++ interface
  • ASN.1 sequences are represented as POD structs - no private members or complex getters and setters
  • No exceptions, no RTTI and limited memory allocations (everything is small buffer optimised)
  • View classes are provided for zero copy decoding
  • Interfaces mimic STL types such as std::string, std::vector and std::optional

Read more about the decisions made writing this library

Limitations

  • No circular data structures
  • Size and value constraints are not implemented

Tools

fast_ber_view can be used to dump the contents of a BER PDU, without requiring a schema.

./build/src/fast_ber_view ./build_gcc/sample/pokemon.ber | jq
{
  "length": 125,
  "identifier": {
    "class": "Universal",
    "tag": "Sequence / Sequence Of"
  },
  "content": ...
}

Call for Test Data

Test data is wanted to improve this project! If you have any test ASN.1 specs or BER files please share them. More test data will improve parsing and help find any issues with the library.

Example Project

fast_ber is designed to be easy to consume via CMake. This is demonstrated in fast_ber_ldap3, an example project using fast_ber to create and dissect LDAP3 certificates.

Compiler Usage

  1. Build the compiler:
git submodule update --init
mkdir build_cmake
cd build_cmake
cmake ..
make
ctest
  1. Define an ASN.1 file - Example: pokemon.asn
Pokemon DEFINITIONS EXPLICIT TAGS ::= BEGIN

Team ::= SEQUENCE {
    team-name OCTET STRING,
    members SEQUENCE OF Pokemon
}

Pokemon ::= SEQUENCE {
    name OCTET STRING,
    category OCTET STRING,
    type Type,
    ability OCTET STRING,
    weakness OCTET STRING,
    weight INTEGER
}

Type ::= ENUMERATED {
    normal,
    fire,
    fighting,
    water,
    flying,
    grass
}

END
  1. Compile an asn file into a header file defining the ber structure
cd build_cmake
./src/fast_ber_compiler pokemon.asn pokemon

output:

#pragma once

#include "fast_ber/ber_types/All.hpp"
#include "pokemon.fwd.hpp"


namespace fast_ber {
using namespace abbreviations;

namespace Pokemon {

enum class TypeValues {
    normal,
    fire,
    fighting,
    water,
    flying,
    grass,
};

template <typename Identifier>
FAST_BER_ALIAS(Type, Enumerated<TypeValues>);

template <typename Identifier>
struct Pokemon {
    OctetString<> name;
    OctetString<> category;
    Type<> type;
    OctetString<> ability;
    OctetString<> weakness;
    Integer<> weight;
};

template <typename Identifier>
struct Team {
    OctetString<> team_name;
    SequenceOf<Pokemon<>> members;
};

} // End namespace Pokemon
} // End namespace fast_ber
  1. Include the header file into your application. Fields in the generated structure can be assigned to standard types. Encode and decode functions are used to serialize and deserialize the data
#include "pokemon.hpp"

int main()
{
    fast_ber::Pokemon::Team<>    team    = {"Sam's Team"};
    fast_ber::Pokemon::Pokemon<> muchlax = { "Munchlax",
                                             "Big Eater",
                                             fast_ber::Pokemon::Type<>::Values::normal,
                                             "Thick Fat, Pickup",
                                             "Fighting",
                                             105 };
    fast_ber::Pokemon::Pokemon<> piplup  = { "Piplup",
                                             "Penguin",
                                             fast_ber::Pokemon::Type<>::Values::water,
                                             Torrent",
                                             "Electric, Grass",
                                             12 };
    team.members.push_back(muchlax);
    team.members.push_back(piplup);

    std::array<uint8_t, 2000> buffer{};
    const auto                encode_result = fast_ber::encode(absl::Span<uint8_t>(buffer), team);
    if (!encode_result.success)
    {
        return -1;
    }

    return 0;
}

Take a look at fast_ber_ldap3 for an example of these steps in action.

Features

fast_ber is in development. The following table documents what has been implemented and what features are coming soon

Type Implemented
Integer Yes
Boolean Yes
Strings Yes
Sequence Yes
Sequence Of Yes
Choice Yes
Set No
Set Of Yes
Enumerated Yes
Object Identifier Yes
Dates / Times No
Null Yes
Any No
Feature Implemented
Explicit tags Yes
Implicit tags Yes
Indefinitive length No
Arbitrary top level structure Yes
Arbritary definition order Yes
Embedded Types Yes
Imports Yes

Possible Future Extensions

The following features may be added in the future

Partial decoding
Partial encode at compile time (templated / constexpr)
High / low conformance modes
DER mode

Benchmarks

fast_ber includes benchmarks against asn1c, an ASN library written in C. Here is an example of the output:

-------------------------------------------------------------------------------
Benchmark: Decode Performance
-------------------------------------------------------------------------------
...............................................................................

benchmark name                                  iters   elapsed ns      average
-------------------------------------------------------------------------------
fast_ber        - 1,000,000 x decode 2107B pdu      1    516381442   516.381 ms
asn1c           - 1,000,000 x decode 2107B pdu      1   4996255249    4.99626 s
fast_ber        - 1,000,000 x decode 64B pdu        1    192230063    192.23 ms
asn1c           - 1,000,000 x decode 64B pdu        1   2581069031    2.58107 s

-------------------------------------------------------------------------------
Benchmark: Encode Performance
-------------------------------------------------------------------------------
...............................................................................

benchmark name                                  iters   elapsed ns      average
-------------------------------------------------------------------------------
fast_ber        - 1,000,000 x encode 2107B pdu      1    191266512   191.267 ms
asn1c           - 1,000,000 x encode 2107B pdu      1   7349946740    7.34995 s

-------------------------------------------------------------------------------
Benchmark: Object Construction Performance
-------------------------------------------------------------------------------
...............................................................................

benchmark name                                  iters   elapsed ns      average
-------------------------------------------------------------------------------
fast_ber        - 1,000,000 x construct data        1   1005938231    1.00594 s
asn1c           - 1,000,000 x construct data        1    511881940   511.882 ms

-------------------------------------------------------------------------------
Benchmark: Calculate Encoded Length Performance
-------------------------------------------------------------------------------
...............................................................................

benchmark name                                  iters   elapsed ns      average
-------------------------------------------------------------------------------
fast_ber        - 1,000,000 x encoded length        1     17084558   17.0846 ms

===============================================================================
All tests passed (31 assertions in 8 test cases)
Comments
  • Guidance on how to create a choice

    Guidance on how to create a choice

    testapp.zip In test.asn1 I have created a CHOICE named Msg, but I can't figure out how to instantiate a Msg of type SPARQLReq for example. I have tried to figure it out from the tests with no luck.

    The class I get like this: fast_ber::TheTest::SPARQLReq<> req; is very nice and friendly.

    opened by HackerBaloo 39
  • Populate Real Type Functionality

    Populate Real Type Functionality

    Real is the floating point type of ASN.1. A skeleton of the Real type has been added (include/fast_ber/ber_types/Real.hpp). Populating this skeleton will allow users to use the Real type in their ASN.1 schemas.

    Encoding and decoding functionality should be provided, according to the rules specified in X.690. The class should hold the real type in partially encoded state, as with integer to reduce parsing / encoding time. Unit tests and benchmarks should be added.

    Acceptance

    • Functions in the Real type are populated
    • Real is added to test/ber_types/RealTest.cpp
    • Real is added to test/ber_types/AllTest.cpp
    • Real is added to benchmarks/ComponentPerformance.cpp
    enhancement help wanted good first issue 
    opened by Samuel-Tyler 24
  • Correctly parse SET in BER mode

    Correctly parse SET in BER mode

    Components of a SET may be arranged in any order. Currently parsing requires that they should be decoded in order. Correct this.

    Elements in the SET may appear in any order. Duplicate items should be detected, causing a compilation failure. Lack of mandatory items should also be detected.

    8.11Encoding of a set value8.11.1The encoding of a set value shall be constructed.8.11.2The contents octets shall consist of the complete encoding of a data value from each of the types listed in the ASN.1 definition of the set type, in an order chosen by the sender, unless the type was referenced with the keyword OPTIONALor the keyword DEFAULT.
    The encoding of a data value may, but need not, be present for a type which was referenced with the keyword OPTIONALor the keyword DEFAULT.NOTE –The order of data values in a set value is not significant, and places no constraints on the orderduring transfer.
    
    opened by Samuel-Tyler 5
  • syntax error when using nameless NULL

    syntax error when using nameless NULL

    In a asn1 file usually compiled with objective systems asn1 compiler there is:

    someSeq ::= SEQUENCE
    {
      NULL
    }
    

    fast_ber chokes in this:

    syntax error, unexpected ASN_NULL, expecting COMPONENTS or ... or } or GENERIC_IDENTIFIER_LOWERCASE
    

    asn1c also compiles this declaration fine.

    opened by jbulow 4
  • IMPORT enumeration FROM module: incorrect code generation

    IMPORT enumeration FROM module: incorrect code generation

    If an IMPORT specifies an enumeration from a module, incorrect code is generated.

    Specifically, the namespace for the module containing the EnumeratedValues for the type is omitted.

    -- Diff against testfiles/import.asn that illustrates the issue --

    --- a/fast_ber/testfiles/import.asn
    +++ b/fast_ber/testfiles/import.asn
    @@ -1,11 +1,13 @@
     ModuleA DEFINITIONS IMPLICIT TAGS ::= BEGIN
     IMPORTS
         StringInModuleB, string-value FROM ModuleB
    -    integer-value, IntegerInModuleC FROM ModuleC;
    +    integer-value, IntegerInModuleC FROM ModuleC
    +    EnumInModuleD FROM ModuleD;
     
     Collection ::= SEQUENCE {
         string StringInModuleB,
    -    integer IntegerInModuleC
    +    integer IntegerInModuleC,
    +    enum EnumInModuleD
     }
     
     END
    @@ -27,3 +29,14 @@ IntegerInModuleC ::= INTEGER
     integer-value IntegerInModuleC ::= 5
     
     END
    +
    +ModuleD DEFINITIONS IMPLICIT TAGS ::= BEGIN
    +EXPORTS EnumInModuleD;
    +
    +EnumInModuleD ::= ENUMERATED {
    +    first (0),
    +    second (1),
    +    third (2)
    +}
    +
    +END
    

    -- Diff between expected .hpp, and what was actually generated

    --- a/import.hpp	2021-08-02 15:04:42.829197796 -0400
    +++ b/fast_ber/test/autogen/import.hpp	2021-08-02 14:59:13.107882016 -0400
    @@ -40,13 +40,13 @@
     
     FAST_BER_ALIAS(IntegerInModuleC, ::fast_ber::Integer<ExplicitId<UniversalTag::integer>>);
     
    -FAST_BER_ALIAS(EnumInModuleD, ::fast_ber::Enumerated<ModuleD::EnumInModuleDValues,ExplicitId<UniversalTag::enumerated>>);
    +FAST_BER_ALIAS(EnumInModuleD, ::fast_ber::Enumerated<EnumInModuleDValues,ExplicitId<UniversalTag::enumerated>>);
     
     struct Collection
     {
         using String = ::fast_ber::OctetString<ExplicitId<UniversalTag::octet_string>>;
         using Integer = ::fast_ber::Integer<ExplicitId<UniversalTag::integer>>;
    -    using Enum_ = ::fast_ber::Enumerated<ModuleD::EnumInModuleDValues,ExplicitId<UniversalTag::enumerated>>;
    +    using Enum_ = ::fast_ber::Enumerated<EnumInModuleDValues,ExplicitId<UniversalTag::enumerated>>;
     
         String string;
         Integer integer;
    
    opened by ezrec 3
  • [8] Implement Set Decoding

    [8] Implement Set Decoding

    #8

    Allows SET type to be decoded with elements in arbitrary order.

    Ensures that mandatory types are specified exactly once, and optional types are specified zero or one times.

    opened by Samuel-Tyler 3
  • Add support of c++17 standard

    Add support of c++17 standard

    When changing in CMakeLists.txt cxx standard in cmake like this: set(CMAKE_CXX_STANDARD 17) And compiling with:

    gcc (Ubuntu 8.1.0-5ubuntu1~16.04) 8.1.0
    

    On latest devel commit Observe an error in choice.hpp:55:

    fast_ber/ber_types/Choice.hpp:55: error: ‘VisitResult’ in namespace ‘absl::variant_internal’ does not name a template type
     absl::variant_internal::VisitResult<Visitor, Choice<Variants...>> visit(Visitor&&                  vis,
                             ^~~~~~~~~~~
    

    I think it happens because absl fallback to std implementation of visit and variant when c++17 is enabled (look for ABSL_USES_STD_VARIANT). So basically variant_internal::VisitResult doesn't exists in that case.

    I don't know best solution, but what i can suggest:

    • replace (maybe conditionally?) visit return type with decltype(auto)
    • fixup places, where visit returns ostream& - because it don't like copy construction, and you need calm rvalue and lvalue references errors.

    Off topic: i think it will be great to add some checks to ci - to prevent any regression in standard support.

    opened by melg8 3
  • compile error with long long integers

    compile error with long long integers

    Hello, I don't know for sure if this is an issue so apologies in advance in case this is an user error. I'm evaluating various ASN.1 projects currently. While trying out your compiler with a sample from my client I get an error with this line:

    Integer64 ::= INTEGER (-9223372036854775808..9223372036854775807)

    The error message from the compiler is:

    Compilation error: stoll argument out of range

    I'm using MSVC 15.9.14 (latest Community 2017)

    opened by cc9cii 3
  • Devel

    Devel

    • Improve parser
    • Add DefaultType
    • Allow circular Choices
    • Bug fixes and testing improvements
    • Add conan
    • Add fast_ber_view
    • Reorganize test cases
    • Add optimized BerContainers, use as a base for ber types
    • Correct comment parsing issue
    opened by Samuel-Tyler 2
  • Build instructions are incomplete

    Build instructions are incomplete

    `cmake ../fast_ber CMake Error at CMakeLists.txt:4 (add_subdirectory): The source directory

    /big/fast_ber/3rd_party/abseil-cpp
    

    does not contain a CMakeLists.txt file. `

    opened by jbulow 2
  • Revert generated types to being concrete

    Revert generated types to being concrete

    Currently all generated types are templated, allowing identifier to be specified as a template parameter. This unfortunately causes long compilation times, confusing typenames and awkward syntax. By moving more code to generated stage rather than templates we can maintain run-time performance whilst improving compile speeds and usability.

    enhancement 
    opened by Samuel-Tyler 1
  • Missing parent namespace when generating dependant ASN.1

    Missing parent namespace when generating dependant ASN.1

    When generating code for ITS-Container.asn and CAM-PDU-Descriptions as per "CAM EN 302 637-2" the generated code cannot be compiled.

    Few types which are referencing from CAM to ITS are missing ITS_Container namespace. Managed to hotfix that by modifying type_as_string to make it find the module where the type occurs and then prefix it with fast_ber and module_name.

    opened by Thiesius 0
  • Automatic tags not working

    Automatic tags not working

    Using ETSI CAM 1.4.1 the Automatic tags are not respected (context_specific class is not used) and the message fails to validate against ASN1 Playground

    Please note that I have no real understanding of ASN.1 and BER encoding. So my fixes might seem naive. Anyways:

    I have managed in somewhat uneducated way fix the encoder with generating context_specific id when the tagging_mode is automatic and the component in collection / choice is a SequenceType or ChoiceType. This "fix" somehow broke encoded_size as the returned value is 204 and real message size is actually 210. This encoding might also work only for my use case as I haven't tested anything else. However the generated bytes are same as the message from ASN1 Playground.

    I also fixed the decoder in similar way as the encoder. "create_collection_decode_functions" for optional types is another sort of hack by collecting all ids from all components and generating that huge "if" statement for them. I only tested that on decoding the message I previously encoded.

    opened by Thiesius 3
  • Potential infinite loop in Real.hpp

    Potential infinite loop in Real.hpp

    There is a possibility of infinite loop in Real.hpp. if the first part of the condition (first_byte & 0xF0) == 0 evaluates as true and exponent is bigger than 0, then for obvious reasons (exponent -= 0) loop never ends.

       /* Mantissa is too small - shift left up to 4 bits */
        int          shift      = 8;
        unsigned int first_byte = double_bytes[1];
    
        /* Adapt exponent */
        while ((first_byte & 0xF0) == 0 && exponent > (8 - shift))
        {
            exponent -= 8 - shift;
        }
    
    opened by Thiesius 0
  • fast_ber::Integer wrong encodding

    fast_ber::Integer wrong encodding

    I've tried using fast_ber for my project as it required BER encoding. It is a Microsoft RDP protocol. It seems that integers are encoded badly, as produced results are not as in BER specification and RDP messages are also expecting different results. Here are some example of integer being encoded badly:

    fast_ber::Integer<> i = 255; result = 02 02 00 ff (wrong) should be: 02 01 ff

    fast_ber::Integer<> i = 65534; result = 02 03 00 ff fe (wrong) should be: 02 02 ff fe

    fast_ber::Integer<> i = 65535; result = 02 03 00 ff ff (wrong) should be: 02 02 ff ff

    Please advise

    opened by pedjaman 7
  • A heap-buffer-overflow in asn_compiler.hpp:11676

    A heap-buffer-overflow in asn_compiler.hpp:11676

    System info

    Ubuntu x86_64, gcc, fast_ber_compiler (latest master 7262b5)

    Configure

    cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address"

    Command line

    ./build_cmake/src/fast_ber_compiler @@ /tmp/fastber

    AddressSanitizer output

    =================================================================
    ==15839==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61500000fee1 at pc 0x0000004cd964 bp 0x7ffc3afd8830 sp 0x7ffc3afd8820
    READ of size 1 at 0x61500000fee1 thread T0
        #0 0x4cd963 in yy::yylex(Context&) /home/styler/git/fast_ber/build_debug/src/autogen/asn_compiler.hpp:11676
        #1 0x4ecd8b in yy::asn1_parser::parse() /home/styler/git/fast_ber/build_debug/src/autogen/asn_compiler.re:7571
        #2 0x45eb31 in main /home/seviezhou/fastber/src/compiler_main/CompilerMain.cpp:481
        #3 0x7f68aedde83f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
        #4 0x469968 in _start (/home/seviezhou/fastber/build_cmake/src/fast_ber_compiler+0x469968)
    
    0x61500000fee1 is located 0 bytes to the right of 481-byte region [0x61500000fd00,0x61500000fee1)
    allocated by thread T0 here:
        #0 0x7f68afd42532 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99532)
        #1 0x5829dd in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<std::istreambuf_iterator<char, std::char_traits<char> > >(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char, std::char_traits<char> >, std::input_iterator_tag) /usr/include/c++/5/bits/basic_string.tcc:188
    
    SUMMARY: AddressSanitizer: heap-buffer-overflow /home/styler/git/fast_ber/build_debug/src/autogen/asn_compiler.hpp:11676 yy::yylex(Context&)
    Shadow bytes around the buggy address:
      0x0c2a7fff9f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x0c2a7fff9f90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x0c2a7fff9fa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x0c2a7fff9fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x0c2a7fff9fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    =>0x0c2a7fff9fd0: 00 00 00 00 00 00 00 00 00 00 00 00[01]fa fa fa
      0x0c2a7fff9fe0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x0c2a7fff9ff0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x0c2a7fffa000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x0c2a7fffa010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x0c2a7fffa020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
    Shadow byte legend (one shadow byte represents 8 application bytes):
      Addressable:           00
      Partially addressable: 01 02 03 04 05 06 07
      Heap left redzone:       fa
      Heap right redzone:      fb
      Freed heap region:       fd
      Stack left redzone:      f1
      Stack mid redzone:       f2
      Stack right redzone:     f3
      Stack partial redzone:   f4
      Stack after return:      f5
      Stack use after scope:   f8
      Global redzone:          f9
      Global init order:       f6
      Poisoned by user:        f7
      Container overflow:      fc
      Array cookie:            ac
      Intra object redzone:    bb
      ASan internal:           fe
    ==15839==ABORTING
    

    POC

    heap-overflow-yylex-asn_compiler-11676.zip

    opened by seviezhou 3
  • Add encoding scheme as a template argument to types

    Add encoding scheme as a template argument to types

    Currently all types are encoded / decoded as ber. A NTTP should be added to each ASN.1 type which allows the user to specify expected encoding scheme. An enum class should be defined to select the scheme. The encoding should be defined for types to allow optimised storage of their encoding.

    Expected format:

    enum class Asn1Encoding
    {
        ber,
        der,
        cer,
        ...
    };
    
    
    template <Asn1Encoding encoding = Asn1Encoding::ber, typename Identifier = ExplicitId<UniversalTag::integer>>
    class Integer
    {
         ...
    };
    
    opened by Samuel-Tyler 0
Releases(v0.4)
  • v0.4(Apr 19, 2020)

    v0.4 Add Real, Conan Support and fast_ber_view

    This release adds the Real type, Conan support and fast_ber_view. Several performance and usability issues are also addressed.

    • Add DefaultType
    • Allow circular Choices
    • Bug fixes and testing improvements
    • Add conan
    • Add fast_ber_view (Visualize arbitrary ber data)
    • Reorganize test cases
    • Add optimized BerContainers, use as a base for ber types
    • Correct comment parsing issue
    • Performance Improvements
    Source code(tar.gz)
    Source code(zip)
  • v0.3(Dec 1, 2019)

    v0.3 Improve API

    This release includes a number of improvements to unify interfaces and usability of the library.

    • Tags are now template parameters to types
    • TaggedType removed
    • Populated all string types
    • Added JSON printing (operator<<) for all types
    • Add choice of storage policy for SequenceOf and Optional, allowing for circular refereneces
    • Add encoded_length(type) function to pre-determine a type's encode length
    • Support C++17 in GCC/Clang/VC++
    Source code(tar.gz)
    Source code(zip)
  • v0.2(Aug 19, 2019)

    v0.2 Improve ASN.1 Parsing

    This release includes a number of improvements to the parsing of ASN.1 files. Additional parsing tests are executed validating the usage of various ASN.1 features.

    • Add tests testing validity of generated hpp files from many different ASN.1 schemas
    • Split resolving of object classes into separate build stage
    • Handle parameterized types at compile stage
    • Fix issues with windows build
    • Add parsing of ANY type
    • Improve parsing of constrained types
    • Add parsing of TypeIdentifier in DefinedObjectClass type
    • Handle nested enumeration types
    • Ignore unknown ASCII chars in ASN.1 schema
    Source code(tar.gz)
    Source code(zip)
  • v0.1(Mar 22, 2019)

    Initial Release of fast_ber

    fast_ber_compiler

    This release introduces fast_ber_compiler, which produces C++ header files for decoding a specific .asn file. The following basic ASN.1 types are supported by fast_ber_compiler.

    • String types
    • Integer types
    • GeneralizedTime
    • Set / SetOf
    • Sequence / SequenceOf
    • Paramaterized types
    • Optional types
    • Enumerated
    • Choice
    • Null
    • Boolean
    • Object Identifier

    BER encoding and decoding functionality is provided for all types.

    fast_ber_compiler

    The various ASN.1 types and the compiler's generated output are tested using unit tests within the Catch2 framework. The tests can by run with the command 'ctest' in the build directory. Builds and tests are run on Linux and Windows for each commit by Travis CI and App Veyor respectively.

    fast_ber_benchmarks

    Benchmarks demonstrate the performance of each of the components added in this release.

    Source code(tar.gz)
    Source code(zip)
Owner
null
RLE-encoding/decoding for files in C

RLE-encoding RLE-encoding/decoding for files in C My version of file encoding/decoding as an assignment for Metropolia UAS in C-programming course . T

Vasily Davydov 3 Aug 26, 2022
Morse code decoding library

ggmorse Morse code decoding library ggmorse2.mp4 ggmorse0.mp4 ggmorse1.mp4 Try it out You can easily test the library using the free GGMorse applicati

Georgi Gerganov 106 Dec 23, 2022
Fast Binary Encoding is ultra fast and universal serialization solution for C++, C#, Go, Java, JavaScript, Kotlin, Python, Ruby, Swift

Fast Binary Encoding (FBE) Fast Binary Encoding allows to describe any domain models, business objects, complex data structures, client/server request

Ivan Shynkarenka 654 Jan 2, 2023
Simple Binary Encoding (SBE) - High Performance Message Codec

Simple Binary Encoding (SBE) SBE is an OSI layer 6 presentation for encoding and decoding binary application messages for low-latency financial applic

Real Logic 2.8k Dec 28, 2022
Consistent Hashing Using Fibonacci Encoding

fibonacci_table This does not work as I thought it would. I did not manage to compute an inverse fibonacci mapping. It works, but just like linear has

Wolfgang Brehm 10 Jan 30, 2021
Base64 Encoding implementation in C Programming Language

cb64 Base64 Encoding implementation in C Programming Language Spec: https://datatracker.ietf.org/doc/html/rfc4648#page-5 Header only So just copy cb64

Telkom DEV 1 Dec 6, 2022
Like my previous encoding project but actually likely finishedable. Also in C++.

EncodedCPP Like my previous encoding project but actually likely finishedable. Also in C++. Now with encoding and decoding options. Saving codes has a

null 1 Jan 1, 2022
A C++11 or library for parsing and serializing JSON to and from a DOM container in memory.

Branch master develop Azure Docs Drone Matrix Fuzzing --- Appveyor codecov.io Boost.JSON Overview Boost.JSON is a portable C++ library which provides

Boost.org 333 Dec 29, 2022
libcluon is a small and efficient, single-file and header-only library written in modern C++ to power microservices.

libcluon Linux & OSX Build (TravisCI) Win64 Build (AppVeyor) Test Coverage Coverity Analysis CII Best Practices libcluon is a small single-file, heade

Christian Berger 81 Nov 30, 2022
Cap'n Proto serialization/RPC system - core tools and C++ library

Cap'n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think Protocol Buffers, except

Cap'n Proto 9.5k Jan 1, 2023
Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32. MIT licensed with consistent, flexible API.

cppcodec Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockf

Topology 491 Dec 28, 2022
FlatBuffers Compiler and Library in C for C

OS-X & Ubuntu: Windows: The JSON parser may change the interface for parsing union vectors in a future release which requires code generation to match

null 550 Dec 25, 2022
Zmeya is a header-only C++11 binary serialization library designed for games and performance-critical applications

Zmeya Zmeya is a header-only C++11 binary serialization library designed for games and performance-critical applications. Zmeya is not even a serializ

Sergey Makeev 99 Dec 24, 2022
A high performance C++14 library for effortlessly reading and writing UBJSON

UbjsonCpp A high performance C++14 library for effortlessly reading and writing UBJSON This library implements UBJSON Draft 12 and Value semmantics Ab

Ibrahim Timothy Onogu 21 Aug 2, 2022
Your binary serialization library

Bitsery Header only C++ binary serialization library. It is designed around the networking requirements for real-time data delivery, especially for ga

Mindaugas Vinkelis 771 Jan 2, 2023
A C++11 library for serialization

cereal - A C++11 library for serialization cereal is a header-only C++11 serialization library. cereal takes arbitrary data types and reversibly turns

iLab @ USC 3.4k Jan 3, 2023
FlatBuffers: Memory Efficient Serialization Library

FlatBuffers FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serializ

Google 19.7k Jan 9, 2023
Simple C++ 20 Serialization Library that works out of the box with aggregate types!

BinaryLove3 Simple C++ 20 Serialization Library that works out of the box with aggregate types! Requirements BinaryLove3 is a c++20 only library.

RedSkittleFox 14 Sep 2, 2022