To Float

Category: Encoding

Status: Registered and callable in the CyberChef 11.3.0 compatibility inventory.

Input / output: byteArray → string

Background: https://wikipedia.org/wiki/IEEE_754

What it does

Convert to IEEE754 Floating Point Numbers

Note

Status here means the operation name is implemented and callable. It does not by itself promise byte-for-byte parity for every upstream option. See Compatibility and current status for the verified scope and known boundaries.

Arguments and options

Arguments are positional. Keep their order when using bake() or Pipeline.then().

Index

Name

UI type

PyChef default

Accepted values / format

0

Endianness

option

'Big Endian'

'Big Endian', 'Little Endian'

1

Size

option

'Float (4 bytes)'

'Float (4 bytes)', 'Double (8 bytes)'

2

Delimiter

option

'Space'

'Space', 'Comma', 'Semi-colon', 'Colon', 'Line feed', 'CRLF'

Recipe template

Important

This is a call template built from the documented defaults. Replace placeholder values such as empty keys, paths, patterns, or lookup data before running it.

from pychef import bake

input_value = b"example"
args = ['Big Endian', 'Float (4 bytes)', 'Space']
result = bake(input_value, [{"op": 'To Float', "args": args}])
print(result)

Pipeline example

from pychef import Pipeline

args = ['Big Endian', 'Float (4 bytes)', 'Space']
transform = Pipeline().then('To Float', *args)
result = transform(b"example")

Dedicated operation module

The registered entry point lives in pychef.operations.by_operation.to_float. Direct calls receive the input value and a positional argument tuple:

from pychef.operations.by_operation.to_float import run

result = run(b"example", tuple(['Big Endian', 'Float (4 bytes)', 'Space']))
pychef.operations.by_operation.to_float.run(value, args)

Run this operation using its shared internal implementation.

Parameters:
  • value (str | bytes)

  • args (Sequence[Any])

Return type:

str | bytes