zstandard_linux 패키지는 Flutter 애플리케이션을 위한 Linux 전용 Zstandard 압축 라이브러리 구현을 제공합니다. Linux 기반의 Flutter 앱 내에서 데이터를 효율적이고 고성능으로 압축 및 해제할 수 있게 합니다. Zstandard 알고리즘과의 호환성을 고려하여 설계되었으며, 빠른 속도와 강력한 압축 비율을 제공합니다. Linux 플랫폼을 대상으로 하는 Flutter 프로젝트에 원활하게 통합될 수 있도록 설계되었으며, 최적의 성능을 위해 네이티브 C 바인딩을 활용합니다. 이 패키지는 Linux 시스템에서 파일 압축, 데이터 전송, 스토리지 최적화와 같은 일반적인 사용 사례를 지원합니다.
사용 사례
Linux에서 큰 파일 압축하기
Linux 앱에서 데이터 전송 최적화
데스크톱 플러터 앱의 저장 사용량 줄이기
실시간 데이터 처리를 위한 고속 압축
효율적인 백업 및 아카이브 처리
주요 기능
리눅스에서의 네이티브 Zstandard 통합
고압축 속도 및 비율
무결점 Flutter 플러그인 인터페이스
C 바인딩과 함께 최소한의 오버헤드
Linux 전용 플랫폼 최적화
적합한 대상
Linux 데스크톱 플러터 개발자
빠른 압축이 필요한 응용 프로그램
데이터 집약형 리눅스 데스크톱 도구
성능 중심 압축 작업
Zstandard 알고리즘을 사용하는 프로젝트
고려 사항
Linux 플랫폼에만 제한됨
네이티브 컴파일 설정이 필요합니다
추가 시스템 종속성이 필요할 수 있습니다
모바일 또는 웹 플랫폼과 호환되지 않습니다
안정적인 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();
}