Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions LICENSES/Unlicense.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Unlicense (Public Domain)
============================

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to &lt;<https://unlicense.org/>&gt;
11 changes: 11 additions & 0 deletions serialization/bson/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
SPDX-FileCopyrightText: 2021 KOLANICH

SPDX-License-Identifier: Unlicense
-->

## bson.bson

Some blob of data serialized into BSON.

Source: Own work.
Binary file added serialization/bson/bson.bson
Binary file not shown.
2 changes: 2 additions & 0 deletions serialization/bson/bson.bson.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2021 KOLANICH
SPDX-License-Identifier: Unlicense
28 changes: 28 additions & 0 deletions serialization/bson/generate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python3

import datetime
import decimal
from pathlib import Path

import dateutil.tz

import bson

__license__ = "Unlicense"

etalon_dict = {
"kaitai": ["is", "awesome"],
"bin": b"bin",
"int": 2,
"float": 3.0,
"NaN": float("nan"),
"inf": float("inf"),
"decimal": decimal.Decimal(100500),
"null": None,
"ts": datetime.datetime(1970, 1, 1, 0, 0, tzinfo=dateutil.tz.tzutc())
}


if __name__ == "__main__":
f = Path("bson.bson")
f.write_bytes(bson.dumps(etalon_dict))