Skip to content

vi/cborsplit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

cborsplit

Splits CBOR data into two streams:

2. Only text and bytestring contents.
1. Everything else.

β”Œβ”€β”€β”€β”€β”€β”€β”     *──────────────*     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ CBOR β”‚ ──> β”‚ cborsplit -s β”‚ ──> β”‚     text     β”‚
β””β”€β”€β”€β”€β”€β”€β”˜     *──────────────*     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚                    β”‚
               β”‚                    β”‚
               ∨                    ∨
             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     *──────────────*     β”Œβ”€β”€β”€β”€β”€β”€β”
             β”‚     misc     β”‚ ──> β”‚ cborsplit -m β”‚ ──> β”‚ CBOR β”‚
             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     *──────────────*     β””β”€β”€β”€β”€β”€β”€β”˜
$ ./cborsplit  --help
Usage:
  cborsplit {-s|--split} in out1 out2
  cborsplit {-m|--merge} in1 in2 out
    '-' instead of in/out means stdin/stdout
    '-' instead of out1/out2/in1/in2 means fd 3/fd 4/fd 3/fd 4

$ ./cborsplit --split something.cbor misc.dat text.dat
$ ./cborsplit --merge misc.dat text.dat something2.cbor
$ cmp something.cbor something2.cbor

Why? Maybe to compress something better or to repace some bytes inside the text.

Hint: JSON data can be round-tripped though CBOR.

License is MIT + Apache 2.

About

Split CBOR data into text/bytestring stream and misc stream

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors