Skip to main content

16384 encode and decode

Project description

✨ pybase16384 ✨

The python binding for base16384

一种神奇的编码

pypi python implementation wheel license action

使用

  • decode
from io import BytesIO

import pybase16384 as pybs

with open("output2.pcm", "rb") as f:
    data = f.read()


for i in range(1):
    pybs.decode_file(BytesIO(data), open("input2.pcm",'wb'))
  • encode
from io import BytesIO

import pybase16384 as pybs

with open("input.pcm", "rb") as f:
    data = f.read()
for i in range(1):
    pybs.encode_file(BytesIO(data), open("output2.pcm",'wb'), True)

公开函数

from typing import BinaryIO

def decode_file(input: BinaryIO, output: BinaryIO) -> None: ...

def encode_file(input: BinaryIO, output: BinaryIO, boolwrite_head: bool = False) -> None: ...

def encode_from_string(data: str, write_head: bool = False) -> bytes: ...

def decode_from_bytes(data: bytes) -> str: ...
  • write_head可以让编码出来的像是一堆utf16,即一堆神奇的汉字,一般在写入文件的时候使用,notepad打开的时候感觉就是一堆汉字

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

pybase16384-0.1.0rc1.tar.gz (51.8 kB view hashes)

Uploaded Source

Built Distributions

pybase16384-0.1.0rc1-cp310-cp310-win_amd64.whl (66.0 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pybase16384-0.1.0rc1-cp310-cp310-macosx_10_15_x86_64.whl (65.0 kB view hashes)

Uploaded CPython 3.10 macOS 10.15+ x86-64

pybase16384-0.1.0rc1-cp39-cp39-win_amd64.whl (66.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pybase16384-0.1.0rc1-cp39-cp39-macosx_10_15_x86_64.whl (65.0 kB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

pybase16384-0.1.0rc1-cp38-cp38-win_amd64.whl (66.0 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pybase16384-0.1.0rc1-cp38-cp38-macosx_10_14_x86_64.whl (64.6 kB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

pybase16384-0.1.0rc1-cp37-cp37m-win_amd64.whl (65.9 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

pybase16384-0.1.0rc1-cp37-cp37m-manylinux2014_x86_64.whl (72.7 kB view hashes)

Uploaded CPython 3.7m

pybase16384-0.1.0rc1-cp37-cp37m-macosx_10_14_x86_64.whl (64.5 kB view hashes)

Uploaded CPython 3.7m macOS 10.14+ x86-64

pybase16384-0.1.0rc1-cp36-cp36m-win_amd64.whl (65.9 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

pybase16384-0.1.0rc1-cp36-cp36m-manylinux2014_x86_64.whl (71.1 kB view hashes)

Uploaded CPython 3.6m

pybase16384-0.1.0rc1-cp36-cp36m-macosx_10_14_x86_64.whl (64.4 kB view hashes)

Uploaded CPython 3.6m macOS 10.14+ x86-64

Supported by

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