Skip to main content

A simple Python library for decoding bytes

Project description

Byte Decoder

A simple Python Library for decoding bytes into various data types.

Installation

pip install byte-decoder

Usage

from byte_decoder import ByteDecoder

decoder = ByteDecoder()

# Decode to integer
int_value = decoder.decode_to_int(b'\x00\0f')
print(int_value) # output: 15

# Decode to string
string_value = decoder.decode_to_string(b'Hello')
print(string_value)  # Output: 'Hello'

# Decode to float
float_value = decoder.decode_to_float(b'@I\x0f\xdb')
print(float_value)  # Output: 3.14159

# Decode to list
list_value = decoder.decode_to_list(b'\x01\x02\x03\x04', 2)
print(list_value)  # Output: [b'\x01\x02', b'\x03\x04']

License

This Project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

byte_decoder-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

byte_decoder-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file byte_decoder-0.1.0.tar.gz.

File metadata

  • Download URL: byte_decoder-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for byte_decoder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0358630e792b4c94a30f19ca03c97f24124f03eeaf3c9c273f8bdfb34eb822b2
MD5 b72dbd90ab1b3aec215252d49caa3ea2
BLAKE2b-256 587b066c915cc37b62c5dc35786029c40330b3b80a9db4662de9b12726ad3820

See more details on using hashes here.

File details

Details for the file byte_decoder-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: byte_decoder-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for byte_decoder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ccedfd36d57261bd9dc71cc4a93b788b6ffa750d1552df8eb63a81e9085ed37
MD5 ff43adb414bd6e23a90b396c048b369a
BLAKE2b-256 2e3a1551bf90471c293fe5177ad31b78a30362aa5922cdef4817958d999b3a43

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page