パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v25.9.23

flat_buffers

Dart用のFlatBuffers読み書きライブラリ。Dart SDKチームのKonstantin ScheglovとPaul Berryによる元の作業に基づく。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
27.7万
いいね数
45
Pub ポイント
140

パッケージをインストール

flutter pub add flat_buffers

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

高速なシリアライズ形式であるFlatBuffersの読み書きを行うDartライブラリです。最小限のメモリオーバーヘッドで、パースやコピーの必要なく、システム間での効率的なデータ交換を可能にします。Dart SDKチームのKonstantin Scheglov氏とPaul Berry氏によるオリジナル作業に基づき、Android、iOS、Web、macOS、Windows、Linuxなど、さまざまなプラットフォームでクロスプラットフォーム利用が可能です。ゲーム、リアルタイムシステム、モバイルアプリなど、高速かつコンパクトなデータシリアライズが必要なアプリケーションに最適です。

用途

  • 高パフォーマンスなデータシリアライゼーション
  • クロスプラットフォーム間のデータ交換
  • ゲーム開発
  • リアルタイムデータ処理
  • モバイルアプリのデータストレージ
  • 組み込みシステム

主な機能

  • ゼロコピードシリアライズ
  • 最小限のメモリ使用量
  • クロスプラットフォーム互換性
  • 高速の読み書き操作
  • スキーマ定義をサポートしています
  • .fbs ファイルから生成されたコード

適している対象

  • パフォーマンスが重要なアプリケーション
  • 高速なデータアクセスを必要とするモバイルおよびウェブアプリ
  • ゲームとシミュレーション
  • データ集約型のバックエンドサービス
  • メモリリソースが限られたシステム

注意事項

  • スキーマ定義(.fbs ファイル)が必要です
  • 新規ユーザーの習得曲線
  • 制限された人間が読める出力
  • バイナリ形式のため、デバッグには適していない
  • コード生成ステップが必要です

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

logo FlatBuffers

Build status BuildKite status Fuzzing Status Discord Chat Twitter Follow Twitter Follow

FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility.

Quick Start

  1. Build the compiler for flatbuffers (flatc)

    Use cmake to create the build files for your platform and then perform the compilation (Linux example).

    cmake -G "Unix Makefiles"
    make -j
    
  2. Define your flatbuffer schema (.fbs)

    Write the schema to define the data you want to serialize. See monster.fbs for an example.

  3. Generate code for your language(s)

    Use the flatc compiler to take your schema and generate language-specific code:

    ./flatc --cpp --rust monster.fbs
    

    Which generates monster_generated.h and monster_generated.rs files.

  4. Serialize data

    Use the generated code, as well as the FlatBufferBuilder to construct your serialized buffer. (C++ example)

  5. Transmit/store/save Buffer

    Use your serialized buffer however you want. Send it to someone, save it for later, etc...

  6. Read the data

    Use the generated accessors to read the data from the serialized buffer.

    It doesn't need to be the same language/schema version, FlatBuffers ensures the data is readable across languages and schema versions. See the Rust example reading the data written by C++.

Documentation

Go to our landing page to browse our documentation.

Supported operating systems

  • Windows
  • macOS
  • Linux
  • Android
  • And any others with a recent C++ compiler (C++ 11 and newer)

Supported programming languages

Code generation and runtime libraries for many popular languages.

  1. C
  2. C++ - snapcraft.io
  3. C# - nuget.org
  4. Dart - pub.dev
  5. Go - go.dev
  6. Java - Maven
  7. JavaScript - NPM
  8. Kotlin
  9. Lobster
  10. Lua
  11. PHP
  12. Python - PyPI
  13. Rust - crates.io
  14. Swift - swiftpackageindex
  15. TypeScript - NPM
  16. Nim

Versioning

FlatBuffers does not follow traditional SemVer versioning (see rationale) but rather uses a format of the date of the release.

Contribution

To contribute to this project, see CONTRIBUTING.

Community

Security

Please see our Security Policy for reporting vulnerabilities.

Licensing

Flatbuffers is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.


カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト