Refactor the code to use [`DataInputStream`](https://valadoc.org/gio-2.0/GLib.DataInputStream.html) instead of own `Buffer` class based on the [`Buffer` class from Node.js](https://nodejs.org/api/buffer.html).