getPositionAtNthLine(nLines) {
        const { size } = fs.statSync(this.filename);

        if (size === 0) {
            return 0;
        }
        
        const fd = fs.openSync(this.filename, 'r');
        // Start from the end of the file and work backwards in specific chunks
        let currentReadPosition = size;
        const chunkSizeBytes = Math.min(1024, size);
        const lineBytes = [];

        let remaining = '';

        while (lineBytes.length < nLines) {
            // Shift the current read position backward to the amount we're about to read
            currentReadPosition -= chunkSizeBytes;

            // If negative, we've reached the beginning of the file and we should stop and return 0, starting the
            // stream at the beginning.
            if (currentReadPosition < 0) {
                return 0;
            }

            // Read a chunk of the file and prepend it to the working buffer
            const buffer = Buffer.alloc(chunkSizeBytes);
            const bytesRead = fs.readSync(fd, buffer,
                0,                  // position in buffer to write to
                chunkSizeBytes,     // number of bytes to read
                currentReadPosition // position in file to read from
            );

            // .subarray returns Uint8Array in node versions < 16.x and Buffer
            // in versions >= 16.x. To support both, allocate a new buffer with
            // Buffer.from which accepts both types
            const readArray = buffer.subarray(0, bytesRead);
            remaining = Buffer.from(readArray).toString(this.encoding) + remaining;

            let index = this.getIndexOfLastLine(remaining);

            while (index !== null && lineBytes.length < nLines) {
                const line = remaining.substring(index);

                lineBytes.push(Buffer.byteLength(line));
                remaining = remaining.substring(0, index);

                index = this.getIndexOfLastLine(remaining);
            }
        }

        fs.closeSync(fd);

        return size - lineBytes.reduce((acc, cur) => acc + cur, 0)
    }
Returns the position of the start of the `nLines`th line from the bottom.
Returns 0 if `nLines` is greater than the total number of lines in the file.
@param {number} nLines
@returns {number}