Simple Binary Encoding (SBE) - High Performance Message Codec
Java C++ Go CMake Makefile Shell
Latest commit 6aa11ee Mar 22, 2017 @mjpt777 mjpt777 [Java] Fix build warning.

Simple Binary Encoding (SBE)

SBE is an OSI layer 6 presentation for encoding and decoding binary application messages for low-latency financial applications. This repository contains the reference implementations in Java, C++, and Golang.

Further details on the background and usage of SBE can be found on the Wiki.

An XSD for SBE specs can be found here

For the latest version information and changes see the Change Log with downloads at Maven Central.

This SBE implementation is designed with work very efficiently with the Aeron messaging system for low-latency and high-throughput communications. SBE has a dependency on Agrona for its buffer implementations.

License (See LICENSE file for full license)

Copyright 2014 - 2017 Real Logic Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Binaries and dependency information for Maven, Ivy, Gradle, and others can be found at

Example for Maven:


Directory Layout

Main source code


Unit tests


Samples of usage



The project is built with Gradle using this build.gradle file.

Full clean build:

$ ./gradlew

Run the Java examples

$ ./gradlew runJavaExamples


Jars for the executable, source, and javadoc for the various modules can be found in


C++ Build using CMake

NOTE: Linux, Mac OS, and Windows only for the moment. See FAQ. Windows builds have been tested with Visual Studio Express 12.

First build using Gradle to generate the SBE jar.

$ ./gradlew

For convenience, a script is provided that does a full clean, build, and test of all targets as a Release build.

$ ./cppbuild/cppbuild

If you are comfortable with using CMake, then a full clean, build, and test looks like:

$ mkdir -p cppbuild/Debug
$ cd cppbuild/Debug
$ cmake ../..
$ cmake --build . --clean-first
$ ctest

Golang Build

First build using Gradle to generate the SBE jar and then use it to generate the golang code for testing

$ ./gradlew
$ ./gradlew generateGolangCodecs

For convenience on Linux, a gnu Makefile is provided that runs some tests and containes some examples

$ cd gocode
# make # test, examples, bench

Users of golang generated code should see the user documentation. Developers wishing to enhance the golang generator should see the developer documentation