xiaohongshu
xiaohongshu
35-pb64-storage
Status: ACTIVE AppliesTo: v10
Full skill instructions
Status: ACTIVE
AppliesTo: v10
이 문서는 pb64 저장(포장) 규약의 정본이다.
pb64는 Unity/UPM 소비를 전제로 하며, Addressables에서 TextAsset으로 로드 가능한 .asset 형태로 저장한다.
이 스킬은 "저장(포장) 규약"만 정의한다. pb64 payload 자체 규약은 각 생성 스킬이 정의/참조한다:
skills/devian-data/33-string-table/SKILL.md의 StringChunk 규약.asset
Unity TextAsset YAML
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!49 &4900000
TextAsset:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: <TABLE_NAME>
m_Script: <PAYLOAD>
두 가지 케이스를 지원한다:
| 케이스 | 사용처 | m_Script 형식 |
|---|---|---|
| Single-line base64 | 일반 Table (DVGB 컨테이너) | 인라인 문자열 |
| Multi-line text | String Table (청크 base64) | Block scalar (` |
Multi-line일 경우 YAML이 깨지지 않도록 block scalar(|) 사용을 강제한다.
m_Script: |
base64Line1
base64Line2
base64Line3
절대 금지:
m_Script: ${multilineText}처럼 단일 라인에 멀티라인 문자열을 끼워 넣기 (YAML 깨짐)
.asset는 Unity TextAsset YAML이므로 TextAsset.text가 YAML 전체를 반환할 수 있다.
StringTable pb64 디코더 규칙:
| 규칙 | 설명 |
|---|---|
| base64 라인만 추출 | YAML 헤더/필드 라인은 무시 |
| 구분자 지원 | \n + ` |
| 실패 로깅 | Devian.Log로 기록 (단, base64 후보 라인에 대해서만) |
| 로그 스팸 방지 | YAML 라인은 base64 후보 필터로 사전 제외 |
base64 후보 판별:
A-Za-z0-9+/= 만 허용Reference:
skills/devian-data/33-string-table/SKILL.md의 "pb64 Encoding/Decoding 규칙" 섹션
일반 Table pb64의 m_Script 페이로드는 DVGB gzip 블록 컨테이너를 base64 인코딩한 것이다.
| Offset | Size | Field | Value |
|---|---|---|---|
| 0 | 4 | Magic | DVGB (ASCII) |
| 4 | 1 | Version | 1 |
| 5 | 4 | BlockSize | 1048576 (1024K, little-endian) |
| 9 | 4 | BlockCount | 블록 개수 (little-endian) |
| Size | Field | Description |
|---|---|---|
| 4 | UncompressedLen | 압축 전 바이트 수 (little-endian) |
| 4 | CompressedLen | gzip 압축 후 바이트 수 (little-endian) |
| CompressedLen | GzipBytes | gzip 압축된 데이터 |
DVGB가 아니면 **기존 포맷(압축 없음)**으로 처리압축 전/후 동일한 포맷. 테이블의 모든 row를 concat:
[row1][row2][row3]...
각 row 구조:
[varint jsonLength][jsonUtf8]
jsonLength: JSON 문자열의 UTF-8 바이트 길이 (protobuf varint 인코딩)jsonUtf8: JSON 문자열의 UTF-8 바이트protobuf 표준 varint 인코딩을 사용한다:
같은 입력이면 항상 같은 .asset 출력이 나와야 한다.
| 역할 | 경로 |
|---|---|
| 일반 Table pb64 생성기 | framework-ts/tools/builder/generators/table.js |
| String Table pb64 생성기 | framework-ts/tools/builder/generators/string-table.js |
.pb64 확장자 사용 금지 (.asset 사용)| 사용).asset임|) 사용됨.pb64// DVGB 컨테이너 로드 (하위 호환 지원)
byte[] rawBinary = Pb64Loader.LoadFromBase64(base64String);
// row 파싱
Pb64Loader.ParseRows(rawBinary, json => {
var entity = JsonConvert.DeserializeObject<MyEntity>(json);
// ...
});
skills/devian-core/03-ssot/SKILL.mdskills/devian-data/32-json-row-io/SKILL.mdskills/devian-data/33-string-table/SKILL.mdxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience