Main
개요
Main은 Aspose.Font FOSS for Python의 클래스입니다. 상속 대상: decode_Decode.
Main.ParseQuality은 문자열 s에서 품질 설정을 파싱하여 quality 객체로 변환합니다.
이 클래스는 Python 프로그램의 Main 객체와 작업하기 위한 27개의 메서드를 제공합니다. 사용 가능한 메서드에는 BROTLI_FAILURE, BROTLI_LOG, BROTLI_LOG_ARRAY_INDEX, BROTLI_LOG_UCHAR_VECTOR, BROTLI_LOG_UINT, BrotliDecompress, BrotliDecompressStreaming, BrotliDecompressedSize, CopyUncompressedBlockToOutput, DecodeBlockType, DecodeBlockTypeWithContext, DecodeContextMap 및 추가 15개의 메서드가 포함됩니다. 모든 공개 멤버는 Aspose.Font FOSS for Python 패키지를 설치한 후 모든 Python 애플리케이션에서 접근할 수 있습니다.
메서드
| 시그니처 | 설명 |
|---|---|
__init__() | Calls init 이 Main 인스턴스에서. |
ParseQuality(s, quality) | 문자열 s에서 품질 설정을 파싱하여 quality 객체에 저장합니다. |
ParseArgv(argc, argv, input_path, output_path, force, quality, decompress) | 명령줄 인수 (argc, argv)를 처리하고 input_path, output_path, force, quality, decompress를 채웁니다. |
main() | 폰트 도구 워크플로우를 실행하는 프로그램 진입점 역할을 합니다. |
BROTLI_FAILURE() | Brotli 압축 해제 실패를 나타내는 상수를 반환합니다 |
BROTLI_LOG_UINT(x) | Brotli 디버깅을 위해 부호 없는 정수 x를 기록합니다 |
BROTLI_LOG_ARRAY_INDEX(array_name, idx) | Brotli 디버깅을 위해 array_name의 인덱스 idx를 기록합니다 |
BROTLI_LOG(x) | Brotli 처리 중에 일반 메시지 x를 기록합니다 |
BROTLI_LOG_UCHAR_VECTOR(v, _hx_len) | Brotli 디버깅을 위해 길이가 _hx_len인 벡터 v를 로그에 기록합니다 |
DecodeWindowBits(br) | Brotli 스트림을 위해 비트 리더 br에서 윈도우 비트를 읽습니다 |
DecodeVarLenUint8(br) | 비트 리더 br에서 가변 길이 uint8을 읽습니다 |
JumpToByteBoundary(br) | br을 다음 바이트 경계로 이동시킵니다 |
DecodeMetaBlockLength(br, meta_block_length, input_end, is_metadata, is_uncompressed) | br에서 메타‑블록 길이를 디코딩하고, 길이와 플래그를 설정합니다 |
ReadSymbol(table, table_off, br) | br을 사용하여 오프셋 table_off에 있는 테이블에서 심볼을 읽습니다 |
ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, s) | num_symbols에 대한 Huffman 코드 길이를 code_lengths에 읽어들입니다 |
ReadHuffmanCode(alphabet_size, table, table_off, opt_table_size, s) | br과 s를 사용하여 alphabet_size에 대한 Huffman 코드 테이블을 구축합니다 |
ReadBlockLength(table, table_off, br) | br을 사용하여 table_off 위치의 테이블에서 블록 길이를 읽습니다. |
TranslateShortCodes(code, ringbuffer, index) | 짧은 코드를 인덱스의 링버퍼 위치로 변환합니다. |
InverseMoveToFrontTransform(v, v_len) | 길이 v_len인 벡터 v에 대해 MTF를 역전합니다. |
HuffmanTreeGroupDecode(group, s) | s를 사용하여 Huffman 트리 그룹을 디코드합니다. |
DecodeContextMap(context_map_size, num_htrees, context_map, s) | 주어진 크기와 트리 수를 사용하여 s로 컨텍스트 맵을 디코딩합니다 |
DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) | max_block_type와 관련 테이블을 사용하여 블록 유형을 결정합니다 |
DecodeBlockTypeWithContext(s, br) | br에서 추가 컨텍스트와 함께 블록 유형을 디코딩합니다 |
CopyUncompressedBlockToOutput(output, pos, s) | 압축되지 않은 블록 데이터를 위치 pos에 출력으로 복사합니다 |
BrotliDecompressedSize(encoded_size, encoded_buffer, encoded_buffer_off, decoded_size) | 인코딩된 버퍼 매개변수에서 압축 해제된 크기를 계산합니다 |
BrotliDecompressStreaming(input, output, finish, s) | 입력에서 출력으로 스트리밍 Brotli 압축 해제를 수행합니다 |
BrotliDecompress(input, output) | 입력에서 출력으로 전체 Brotli 버퍼를 압축 해제합니다 |