There is no good reason why this should be done by main thread so the encoding should take place in the worker thread and the buffer should then be moved/transferred to the main thread.
We should also remove BufferManager.ts
which is currently only used by FoodChunk
.
Blocked by #81