패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.5.6

zstandard_android

Flutter 애플리케이션용 Zstandard 압축 플러그인의 Android 구현.

Android
30일 다운로드
5.1만
좋아요
1
Pub 점수
160

패키지 설치

flutter pub add zstandard_android

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

zstandard_android 패키지는 플러터 애플리케이션을 위한 안드로이드 전용 Zstandard 압축 알고리즘 구현체를 제공합니다. 고성능 Zstandard 라이브러리를 활용하여 안드로이드 기기에서 데이터의 압축 및 해제를 효율적으로 수행할 수 있습니다. 이 플러그인은 모바일 앱 내에서 대규모 데이터셋 또는 파일의 저장 공간 사용량을 줄이고 전송 속도를 향상시키는 데 이상적입니다. 플러터의 플랫폼 채널을 통해 네이티브 압축 기능을 노출시켜 원활한 통합을 지원합니다. 패키지는 vyp.dev에서 유지보수되며, 투명성과 커뮤니티 기여를 위해 GitHub에 호스팅되어 있습니다.

사용 사례

  • 저장 전에 앱 데이터 압축하기
  • 네트워크 페이로드 크기 축소
  • 파일 전송 최적화
  • 작은 자산을 사용하여 앱 성능 향상
  • 대규모 데이터 세트를 효율적으로 처리하기

주요 기능

  • 고속 압축 및 압축 해제
  • 네이티브 안드로이드 성능
  • 무결점 Flutter 통합
  • 오픈소스이며 투명함
  • 경량이고 효율적

적합한 대상

  • 빠른 데이터 압축이 필요한 앱
  • 대용량 파일을 처리하는 모바일 앱
  • 네트워크 집약형 애플리케이션
  • 고성능 압축을 원하는 개발자
  • Android 중심의 Flutter 프로젝트

고려 사항

  • Android 플랫폼에 한정
  • 완전한 기능을 위해 원격 설정이 필요합니다
  • 앱 크기가 약간 증가할 수 있습니다
  • 외부 네이티브 라이브러리에 종속
  • iOS 또는 기타 플랫폼과 호환되지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

pub package
pub package
codecov

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.


Compatibility

Android iOS Web macOS Windows Linux Fuchsia
Flutter :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: (wasm) :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: ❌
Native FFI FFI WebAssembly FFI FFI FFI ❌
Precompiled No No Yes No No No ❌
macOS Windows Linux
x64 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
arm64 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Precompiled Yes Yes Yes

Documentation

Full documentation is in the docs/ directory, including:


Basic Usage

In-App (Flutter)
import 'package:zstandard/zstandard.dart';

void main() async {
  final zstandard = Zstandard();

  Uint8List originalData = Uint8List.fromList([...]);

  Uint8List? compressed = await zstandard.compress(originalData, 3);
  
  final decompressed = compressed == null
      ? null
      : await zstandard.decompress(compressed, maxOutputSize: 64 * 1024 * 1024);
}

Using extensions:

import 'package:zstandard/zstandard.dart';

void main() async {
  Uint8List originalData = Uint8List.fromList([...]);

  Uint8List? compressed = await originalData.compress();
  
  final decompressed = await compressed.decompress(
    maxOutputSize: 64 * 1024 * 1024,
  );
}
Command Line (zstandard_cli)
# 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';

void main() 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';

void main() async {
  final originalData = Uint8List.fromList([...]);

  final compressed = await originalData.compress(compressionLevel: 3);

  final decompressed = await compressed.decompress();
}

Screenshots

Compression and Decompression Samples
macOS

Windows

Linux

Flutter Plugin (Android, iOS, macOS, Web, Windows, Linux)


License

This project uses code from the original facebook/zstd repository. Please see the LICENSE file for more information.

카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.

순위