MCPcopy Create free account
hub / github.com/apache/fory / _can_use_small_decimal_encoding

Function _can_use_small_decimal_encoding

python/pyfory/serializer.py:331–334  ·  view source on GitHub ↗
(unscaled: int)

Source from the content-addressed store, hash-verified

329
330
331def _can_use_small_decimal_encoding(unscaled: int) -> bool:
332 if unscaled < _MIN_INT64 or unscaled > _MAX_INT64:
333 return False
334 return _encode_zigzag64(unscaled) <= _MAX_SMALL_ZIGZAG
335
336
337def _decimal_parts(value: decimal.Decimal) -> Tuple[int, int]:

Callers 1

_write_decimal_partsFunction · 0.85

Calls 1

_encode_zigzag64Function · 0.85

Tested by

no test coverage detected