zstandard_macos 패키지는 Flutter 애플리케이션을 위한 맥OS 전용 Zstandard 압축 알고리즘 구현을 제공합니다. 맥OS 플랫폼에서 데이터의 효율적이고 고성능 압축 및 해제를 가능하게 하며, 최적의 속도와 압축 비율을 위해 네이티브 Zstandard 라이브러리를 활용합니다. 맥OS를 대상으로 하는 Flutter 앱에서 빠르고 신뢰할 수 있는 파일 압축 기능을 원하는 개발자를 위해 설계되었으며, 기존의 Dart 코드와 무리 없이 통합됩니다. 대규모 데이터셋 처리, 스토리지 사용량 감소, 또는 맥OS 네이티브 애플리케이션 내 데이터 전송 최적화에 특히 유용합니다.
사용 사례
저장을 위해 큰 파일 압축하기
macOS 앱에서 데이터 전송 최적화
앱 번들 크기 줄이기
실시간 데이터 압축 처리
파일 작업 성능 향상
주요 기능
네이티브 Zstandard 통합
고압축 비율
빠른 압축/압축 해제 속도
macOS 전용 플랫폼 지원
무결점 Flutter 통합
적합한 대상
macOS를 대상으로 하는 Flutter 개발자
효율적인 파일 압축이 필요한 응용 프로그램
성능 민감한 데이터 처리
대규모 데이터 세트를 관리하는 앱
고려 사항
macOS 플랫폼에 한정됨
네이티브 라이브러리 설정이 필요합니다
앱 바이너리 크기 증가 가능
외부 Zstandard 라이브러리에 의존
다른 플랫폼과 호환되지 않습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Zstandard
Zstandard (zstd) is a fast, high-compression algorithm developed by Meta (formerly Facebook) designed for real-time compression scenarios. It offers a flexible range of compression levels, allowing both high-speed and high-ratio compression, making it ideal for applications with diverse performance needs. Zstandard is widely used in data storage, transmission, and backup solutions.
This repository contains a federated Flutter plugin and a CLI package for zstandard compression, enabling both in-app and command-line usage. The two main components are:
zstandard: A Flutter plugin for cross-platform compression, supporting mobile, desktop, and web platforms. This package integrates the zstd library through FFI for native platforms and WebAssembly for the web, allowing efficient data compression in any Flutter environment.
zstandard_cli: A pure Dart package providing CLI capabilities for macOS, Windows, and Linux. It enables command-line compression and decompression for data files and streams.
Native platform packages and the CLI share the zstd C source and FFI bindings via the zstandard_native package (zstandard_native/src/zstd/). zstandard_native is published to pub.dev as part of this repo’s release set, so a single copy is used whether you depend on the plugin from the repo or from pub.dev.
# Compress a file with a specified compression level
dart run zstandard_cli:compress --level 3 myfile.txt
# Decompress a file
dart run zstandard_cli:decompress myfile.txt.zstd
Dart Code Example (CLI)
import'package:zstandard_cli/zstandard_cli.dart';
voidmain() async {
var cli = ZstandardCLI();
final originalData = Uint8List.fromList([...]);
final compressed = await cli.compress(originalData, compressionLevel: 3);
final decompressed = await cli.decompress(compressed ?? Uint8List(0));
}
Using extensions in Dart:
import'package:zstandard_cli/zstandard_cli.dart';
voidmain() async {
final originalData = Uint8List.fromList([...]);
final compressed = await originalData.compress(compressionLevel: 3);
final decompressed = await compressed.decompress();
}