How to decode bson?

I have read tinybson.c. But I didn’t understand how to decode the file params in SD.
Can you explain it briefly?

Appreciate your attention!