Skip to main content

DFTSerialize™

DFTSerialize™ Logo

DFTSerialize™ is a next-generation data encoding and serialization system designed for Python 3.0 and aboveDFTSerialize™ uses a highly-customized algorithm that encodes any and all (most) Python data structures as bytes, and can even function on RAW BYTES.

Features

  • Snappy and efficient encoding of most Python objects and raw binary data
  • Equally efficient decoding of the output to recover original Python objects or binary data
  • Uses a BUNCH of fancy math and has its own reimplementation of many standard library functions for maximum effectiveness
  • Has a really cool logo

Why

Current serialization systems are stagnant and obsolete. Underutilization of the advantages of floating point processing and mathematical techniques like curve-fitting and function transforms. DFTSerialize™ aims to fix all this.

We noticed that in quantum mechanics, which has many applications in faster computing, there are a lot of these things called "waveforms". So we did some digging and discovered that these were actually wavy functions, and that the parameters of these functions could even be used to reconstruct data! Additionally, these waveforms are probably easier to compute on quantum computers because of the fact that they're both wavy and stuff.

Upon further research, we discovered that JPEG images already use a wavy-function based compression algorithm called the "discrete cosine transform", but when we looked that up it seemed pretty hard so we had our accountants make us another one called the "discrete Fourier transform." We think it's way more marketable since it has a French guy's name in it.

Usage

To use DFTSerialize™, simply install it to your Python version 3.5 or higher using the PIP package manager, like so:

pip install dftserialize

Then, import it in your project. It contains four functions, two for serialization, two for deserialization, of both Python objects and binary data.

Example:

from dftserialize import *

for i in range(30):
    # data = b'x\xda\xe3e@\x02K&:\xc0\x987>$\xcev\xad7w8e\xd6k\xa1ef\xe6\x10U\x91\xa0\xa4...
    data = dft_serialize_data(b"Hello, World!")
    # b"Hello, World!"
    print(dft_deserialize_data(data))

    # true
    assert {1: 2, 3: 4} == dft_deserialize_object(dft_serialize_object({1: 2, 3: 4}))

Speed

DFTSerialize™ is extremely fast and robust! For testing, I took a 7 MB image file and attempted to run it directly through a raw serialization. It didn't finish since I eventually had to shut my computer off, but the point is that it was working.

Reducing the data size down to a 2kb file allowed DFTSerialize™ to completely encode the file in just under 10 minutes, a milestone achievement.

DFTSerialize™ Algorithm

DFTSerialize™ uses a patented[citation needed] algorithm utilizing a near-magical combination of the discrete Fourier transform, floating point math, and even on-the-fly calculation of mathematical constants like pi.

DFTSerialize™ serialization follows a simple set of steps

  1. Pass raw bytes into an FFT

  2. Pack DFT coefficients

  3. Wait around for a second or two so it seems like we have something to do

DFTSerialize™ deserialization follows a similar set of steps, in inverse:

  1. Unpack DFT coefficients

  2. Perform an Inverse DFT

  3. Are we done? Maybe? Anybody?

  4. Wipe all drives if the user isn't satisfied by now

Credits

The idea for the DFTSerialize™ library came in the form of an escalating series of Reddit posts eventually culminating in the use of an inverse DFT to decode text from a series of complex coefficients.

License

DFTSerialize™ is released under the GNU GPL v3 License. Please refer to the LICENSE file that accompanies this project for more information including complete terms and conditions.

Serious Note

This project is a complete and utter joke and should never, ever be used for anything. In fact, I challenge you to find an actual use for this software. Actually, I double challenge you to also push this to production right before you quit your job, and then send me the results.

Metadata

Release files for dftserialize 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dftserialize 0.2.0
File Size Uploaded
dftserialize-0.2.0.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dftserialize 0.2.0
File Interpreter ABI Platform
dftserialize-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.9 kB

Release files / dftserialize-0.2.0.tar.gz

Download URL dftserialize-0.2.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7c5e771951641d0a83a719c0696fdc241ec9d46cf2560f5515882fe068e9e302
BLAKE2b-256 checksum
How to use checksums
83bf59a10cfcf5d727c82269e044add51499e9767681b64e62ce2e41dc52e490
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.0

Release files / dftserialize-0.2.0-py3-none-any.whl

Download URL dftserialize-0.2.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb8cc8adf868147abab7f37aafae4e7ede05abf4aa6b72793d9846846c70c586
BLAKE2b-256 checksum
How to use checksums
38bbe741cb0b63ad857eb656e20eeff553410a6b0dee52a740426a1c54556755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page