[go: up one dir, main page]

Skip to content
/ cborsplit Public

Split CBOR data into text/bytestring stream and misc stream

Notifications You must be signed in to change notification settings

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

No packages published