An idea possibly independently invented by a few people, but that I know from [[Philipp Krüger]].
## Chronology
- [Fission internal `#wild-ideas` post](https://discordapp.com/channels/478735028319158273/560980167795671060/989471650162556958 "https://discordapp.com/channels/478735028319158273/560980167795671060/989471650162556958") ([[2022]])
- Described briefly in [[Data Transfer batching Techniques featuring Blake3, CAR Mirror, and more]]
- [[Irakli Gozalishvili]], [[WarpFork]], and [[Brooklyn Elizabeth Zelenka|I]] discussed it at length at [[IPFS þing]] [[2023]]
- Internal [[Fission Codes]] discussion continued from there
## Notes
- [[Philipp Krüger]] approached it from the angle that it would pack better for [[Bao Transfer]]
- [[Irakli Gozalishvili]] and I wanted something more compact and more readable for humans
```mermaid
flowchart LR
subgraph User
Source <--> Inliner
Inliner <--> User_IPFS
end
User_IPFS <--> Wire
Wire <--> Outliner
subgraph Service
Outliner <--> Service_IPFS
end
```
Or in somewhat higher detail:
```mermaid
sequenceDiagram
LocalStore -) Codec:
Codec -) Codec: Outline/expand blocks
Codec -) UserIPFS:
UserIPFS -) ServiceIPFS: Send over the wire
ServiceIPFS --) UserIPFS: Receive over the wire
UserIPFS --) Codec:
Codec --) Codec: Inline/collapse blocks
Codec --) LocalStore:
```
## WIP Idea Snippets
This would have to be more at a layer like a [[CAR file]] rather than [[IPLD]] itself, but we think everyone wants a way to pack IPLD like this when your data is likely to be a tree
### Before
```json
{
"name": "Smokey",
"animal": "cat",
"owner": {"/": "bafy...owner"}
}
bafy...owner = {
"name": "Katie Wilde",
"city": "Vancouver"
}
```
### After
```json
{
"name": "Smokey",
"animal": "cat",
"owner": {
"/": {
"name": "Katie Wilde",
"city": "Vancouver"
}
}
}
```
Where the inlined object would use the hashing parameters of the parent by default (e.g. SHA256 & same codec etc). We often want the same codec across a bunch of serialisations, but that changes the CID, so this helps. [[Irakli Gozalishvili]] is also playing with adding an optional field to include the [[Content Identifier|CID]] if its parameters different which is something like:
```json
{
"/": [
"bafy...forcedCidEncoding",
{
"name": "Katie Wilde",
"city": "Vancouver"
}
]
}
```
At time of writing, a bunch of the conversations landed was that this technique probably should be a layer on top of IPLD, and thus be a parallel to something like a [[CAR file]]. At actually works really well with BAR files ([[number zero]]'s [[Bao Transfer]] which we've come to discover uses essentially [[Bao]]-ified [[CAR file]]s)