Briar uses the Bramble Sync Protocol [(BSP)](https://code.briarproject.org/briar/briar-spec/blob/master/protocols/BSP.md) to share data between two Briar users. These messages are encrypted using the Bramble Transport Protocol (BTP)[https://code.briarproject.org/briar/briar-spec/blob/master/protocols/BTP.md]. The encryption results in a *stream* of encrypted BSP messages, which we want to store as a file on the mailbox for later retrieval. While it would be possible to just try and send these streams all at once, we chose to chunk a single stream into equally sized parts which are sent individually and later recovered at the receiving end. This allows briar to continue an interrupted up-/download of a stream.
# Usage
# Overview
*Note: Mailbox chunking is designed to be used with the Mailbox Protocol. See [here](https://code.briarproject.org/goapunk/briar-repeater/wikis/Mailbox-Protocol) for a reference.*
Chunked files are shared between the mailbox application and Briar (Mailbox owner or one of their contacts). Either Briar or the Mailbox can be the recipient or the sender but the procedure is identical for both: