고성능 직렬화 형식인 FlatBuffers를 읽고 쓰기 위한 Dart 라이브러리입니다. 최소한의 메모리 오버헤드로 시스템 간에 효율적인 데이터 교환을 가능하게 하며, 파싱이나 복사가 필요 없습니다. Dart SDK 팀의 Konstantin Scheglov와 Paul Berry가 만든 원작 기반으로, Android, iOS, Web, macOS, Windows, Linux 등 다양한 플랫폼에서 크로스플랫폼 사용을 지원합니다. 게임, 실시간 시스템, 모바일 앱과 같이 빠르고 컴팩트한 데이터 직렬화가 필요한 애플리케이션에 이상적입니다.
사용 사례
고성능 데이터 직렬화
크로스 플랫폼 데이터 교환
게임 개발
실시간 데이터 처리
모바일 앱 데이터 저장
임베디드 시스템
주요 기능
제로 코피 디시리얼라이제이션
최소 메모리 사용
크로스 플랫폼 호환성
빠른 읽기/쓰기 작업
스키마 정의를 지원합니다
.fbs 파일에서 생성된 코드
적합한 대상
성능 중심 애플리케이션
빠른 데이터 접근이 필요한 모바일 및 웹 앱
게임 및 시뮬레이션
데이터 집약적인 백엔드 서비스
메모리 자원이 제한된 시스템
고려 사항
스키마 정의(.fbs 파일)가 필요합니다
신규 사용자를 위한 학습 곡선
제한된 인간이 읽을 수 있는 출력
이진 형식으로 인해 디버깅에 적합하지 않음
코드 생성 단계가 필요합니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
FlatBuffers
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
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
Define your flatbuffer schema (.fbs)
Write the schema to define the data you want to serialize. See monster.fbs for an example.
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.
Serialize data
Use the generated code, as well as the FlatBufferBuilder to construct your serialized buffer. (C++ example)
Transmit/store/save Buffer
Use your serialized buffer however you want. Send it to someone, save it for later, etc...
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.