✏️ 正在编辑: _int.py
路径:
/var/opt/nydus/ops/oscrypto/_int.py
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
# coding: utf-8 """ Function to fill ensure integers converted to a byte string are a specific width. Exports the following items: - fill_width() """ from __future__ import unicode_literals, division, absolute_import, print_function __all__ = [ 'fill_width', ] def fill_width(bytes_, width): """ Ensure a byte string representing a positive integer is a specific width (in bytes) :param bytes_: The integer byte string :param width: The desired width as an integer :return: A byte string of the width specified """ while len(bytes_) < width: bytes_ = b'\x00' + bytes_ return bytes_
💾 保存文件
← 返回文件管理器