/
lib
/
python3.9
/
site-packages
/
elftools
/
construct
/
__pycache__
/
up file
home
a �#�_�@ � @ s� d dl mZmZmZ d dlmZmZmZ d dlmZm Z d dl mZmZ G dd� de�Z G dd� de�ZG d d � d e�ZG dd� de�ZG d d� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d!d"� d"e�ZG d#d$� d$e�ZG d%d&� d&e�ZG d'd(� d(e�ZG d)d*� d*e�ZG d+d,� d,e�Z G d-d.� d.e �Z!G d/d0� d0e �Z"d1S )2� )�Adapter�AdaptationError�Pass)� int_to_bin� bin_to_int� swap_bytes)�FlagsContainer� HexString)�BytesIO�decodebytesc @ s e Zd Zg ZdS )�BitIntegerErrorN��__name__� __module__�__qualname__� __slots__� r r �?/usr/lib/python3.9/site-packages/elftools/construct/adapters.pyr s r c @ s e Zd Zg ZdS )�MappingErrorNr r r r r r s r c @ s e Zd Zg ZdS )� ConstErrorNr r r r r r s r c @ s e Zd Zg ZdS )�ValidationErrorNr r r r r r s r c @ s e Zd Zg ZdS )�PaddingErrorNr r r r r r s r c @ s2 e Zd ZdZg d�Zddd�Zdd� Zd d � ZdS ) �BitIntegerAdaptera� Adapter for bit-integers (converts bitstrings to integers, and vice versa). See BitField. Parameters: * subcon - the subcon to adapt * width - the size of the subcon, in bits * swapped - whether to swap byte order (little endian/big endian). default is False (big endian) * signed - whether the value is signed (two's complement). the default is False (unsigned) * bytesize - number of bits per byte, used for byte-swapping (if swapped). default is 8. )�width�swapped�signed�bytesizeF� c C s( t �| |� || _|| _|| _|| _d S �N)r �__init__r r r r )�self�subconr r r r r r r r ( s zBitIntegerAdapter.__init__c C s>