Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
552d1538
Unverified
Commit
552d1538
authored
7 years ago
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added more statistics on binary formats
parent
60e2d28e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
doc/binary_formats.md
doc/binary_formats.md
+9
-10
No files found.
doc/binary_formats.md
View file @
552d1538
...
...
@@ -157,16 +157,15 @@ The optimized formats for containers are supported: Parameter `use_size` adds si
## Size comparison examples
The following table shows the size
(in bytes) of different files in the
`test/data`
direc
tory for the different formats.
The following table shows the size
compared to the original JSON value for different files from the reposi
tory for the different formats.
| format | sample.json |
floats.json | all_unicode
.json |
| ----------------------- | -----------:| -----------
:| -----
-----------:|
| JSON |
687491 | 22670390 | 13279259
|
| CBOR |
**147095**
| 9000005 |
**5494662**
|
| M
sgPack | 148395 | 9000005 |
**5494662**
|
| UBJSON unoptimized |
148695 | 9000002 | 7718787
|
| UBJSON size-optimized |
150569 | 9000007 | 7718792
|
| UBJSON format-optimized |
150883 |
**8000009**
| 7718792
|
| format | sample.json |
all_unicode.json | floats.json | signed_ints.json | jeopardy.json | canada
.json |
| ----------------------- | -----------:| -----------
-----:| -----------:| ----------------:| -------------:|
-----------:|
| JSON |
100.00 % | 100.00 % | 100.00 % | 100.00 % | 100.00 % | 100.00 %
|
| CBOR |
87.21 % | 71.18 % | 48.20 % | 44.16 % | 87.96 % | 50.53 %
|
| M
essagePack | 87.16 % | 71.18 % | 48.20 % | 44.16 % | 87.91 % | 50.56 %
|
| UBJSON unoptimized |
88.15 % | 100.00 % | 48.20 % | 44.16 % | 96.58 % | 53.20 %
|
| UBJSON size-optimized |
89.26 % | 100.00 % | 48.20 % | 44.16 % | 97.40 % | 58.56 %
|
| UBJSON format-optimized |
89.45 % | 100.00 % | 42.85 % | 39.26 % | 94.96 % | 55.93 %
|
The results show that there does not exist a "best" encoding. Furthermore, it is not always worthwhile to use UBJSON's optimizations.
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment