PsdSectionReader
Overview
PsdSectionReader is a class in Aspose.Psd FOSS for Python.
Provides bounded reads for PSD/PSB sections that are stored in memory by this implementation.
This class declares 5 methods for PsdSectionReader objects in Python programs.
Available methods include: ReadBytes, get_memory_backed_length, get_nested_memory_backed_length, read_bytes, validate_signed_length.
Public members are accessible to any Python application after installing the Aspose.Psd FOSS for Python package.
Methods
| Signature | Description |
|---|---|
read_bytes(reader: BigEndianReader, length: int, section_name: str) → bytes | Reads a declared section payload after validating stream boundaries and the in-memory size limit. |
ReadBytes(reader: BigEndianReader, length: int, section_name: str) → bytes | Calls ReadBytes(reader, length, section_name) on this PsdSectionReader instance. |
get_memory_backed_length(reader: BigEndianReader, length: int, section_name: str) → int | Validates a declared section length and returns the equivalent in-memory array size. |
validate_signed_length(length: int, section_name: str) → int | Validates a signed length field that belongs to a bounded section. |
get_nested_memory_backed_length(reader: BigEndianReader, length: int, section_end: int, section_name: str) → int | Validates that a nested payload stays inside the already-bounded enclosing section. |