You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a serialization library that supports **variable length integers/doubles**, **UTF8 strings** and serialization of **boolean bits**.
20
18
This library is designed to be **strong**, **lightweight** and **fast**, using (one-malloc) allocation strategy and minimizing the amount of resources during serialization/deserialization.
@@ -25,21 +23,34 @@ Each "packet" is defined in a packet table, a fixed number of fields is assigned
25
23
26
24
Programmers must register their packets in the table before any de/serialization activity, this way thread safety can be achieved.
27
25
28
-
-------------------------------------
29
26
30
-
## Installation
27
+
#Linux-Installation
31
28
32
-
For now only Linux manual installation option is available, along with Android binding...
29
+
## Requirements
33
30
34
-
## Manual-Linux-Installation
31
+
-[cmake](https://cmake.org/install/) is required in order to build this library.
32
+
- Download this repository, either by zip or git using:
33
+
```
34
+
git clone https://github.com/st1vms/dynamic-bits
35
+
```
35
36
36
-
### Requirements-Linux
37
+
## Before building
38
+
_____________________________________
37
39
38
-
-[cmake](https://cmake.org/install/) is required in order to build this library.
39
40
40
-
After downloading the git repository, move into the downloaded directory, make a build folder and generate build files using cmake.
41
+
Ensure to set optimal values for `PACKET_TABLE_SIZE` and `MAX_PACKET_FIELDS` macros. They are located in the first lines of [include/dpacket.h](include/dpacket.h)
42
+
43
+
***PACKET_TABLE_SIZE** -> Max number of packets that can be registered.*
44
+
45
+
***MAX_PACKET_FIELDS** -> Max number of fields a packet can hold.*
46
+
47
+
It is drastically important to tweak these two values in order to optimize space required for building the static packet table.
48
+
49
+
## Building-On-Linux-CMake
50
+
__________________________________
51
+
52
+
After configuration is done, open a terminal inside the repository directory, make a build folder and generate build files using cmake.
41
53
```
42
-
git clone https://github.com/st1vms/dynamic-bits
43
54
cd ./dynamic-bits
44
55
mkdir build
45
56
cd build
@@ -48,28 +59,33 @@ cmake .. && cmake --build .
48
59
49
60
Inside the build folder you will find the generated shared library.
50
61
51
-
To install the library run these two commands inside build folder...
62
+
To install the library on Linux run these two commands inside build folder...
52
63
53
64
```
54
65
sudo make install
55
66
sudo ldconfig /usr/local/lib
56
67
```
57
68
58
-
-------------------------------------
59
-
60
-
## Uninstalling
61
-
62
-
Run these two commands inside project folder...
63
-
```
64
-
chmod u+x uninstall.sh
65
-
sudo ./uninstall.sh
66
-
```
67
69
68
-
-------------------------------------
70
+
# Manual-Android-Installation
69
71
70
-
## Manual-Android-Installation
71
72
- Install [Android Studio](https://cmake.org/install/) if not already installed.
72
73
- Open the JDBits bind project inside Android Studio
74
+
75
+
## Before Building ( Android )
76
+
_____________________________________
77
+
Ensure to set optimal values for `PACKET_TABLE_SIZE` and `MAX_PACKET_FIELDS` macros. They are located in the first lines of [jdbits/src/main/cpp/include/dpacket.h](binds/Android/JDBits/jdbits/src/main/cpp/include/dpacket.h)
78
+
79
+
***PACKET_TABLE_SIZE** -> Max number of packets that can be registered.*
80
+
81
+
***MAX_PACKET_FIELDS** -> Max number of fields a packet can hold.*
82
+
83
+
It is drastically important to tweak these two values in order to optimize space required for building the static packet table.
84
+
85
+
86
+
## Building AAR library in Android Studio
87
+
_____________________________________
88
+
73
89
- After syncing gradle files, open a terminal and execute this command:
@@ -79,19 +95,29 @@ You will find the generated **jdbits-<build_version>.aar** file inside the `buil
79
95
80
96
Copy the AAR file into your Android project **`libs`** folder, and import is as an **`implementation`** dependency, using the Android Studio dependency manager in your Project Settings.
81
97
82
-
-------------------------------------
83
98
84
99
## Usage
100
+
_____________________________________
85
101
86
102
Please refer to the examples provided in the [examples](examples/) folder, for the specific language/platform you're using...
0 commit comments