Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
552d1538
Unverified
Commit
552d1538
authored
Jan 31, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📝
added more statistics on binary formats
parent
60e2d28e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
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
...
@@ -157,16 +157,15 @@ The optimized formats for containers are supported: Parameter `use_size` adds si
## Size comparison examples
## 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 |
| format | sample.json |
all_unicode.json | floats.json | signed_ints.json | jeopardy.json | canada
.json |
| ----------------------- | -----------:| -----------
:| -----
-----------:|
| ----------------------- | -----------:| -----------
-----:| -----------:| ----------------:| -------------:|
-----------:|
| JSON |
687491 | 22670390 | 13279259
|
| JSON |
100.00 % | 100.00 % | 100.00 % | 100.00 % | 100.00 % | 100.00 %
|
| CBOR |
**147095**
| 9000005 |
**5494662**
|
| CBOR |
87.21 % | 71.18 % | 48.20 % | 44.16 % | 87.96 % | 50.53 %
|
| M
sgPack | 148395 | 9000005 |
**5494662**
|
| M
essagePack | 87.16 % | 71.18 % | 48.20 % | 44.16 % | 87.91 % | 50.56 %
|
| UBJSON unoptimized |
148695 | 9000002 | 7718787
|
| UBJSON unoptimized |
88.15 % | 100.00 % | 48.20 % | 44.16 % | 96.58 % | 53.20 %
|
| UBJSON size-optimized |
150569 | 9000007 | 7718792
|
| UBJSON size-optimized |
89.26 % | 100.00 % | 48.20 % | 44.16 % | 97.40 % | 58.56 %
|
| UBJSON format-optimized |
150883 |
**8000009**
| 7718792
|
| 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.
The results show that there does not exist a "best" encoding. Furthermore, it is not always worthwhile to use UBJSON's optimizations.
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