If you use the blob object for browser-side file downloads and then call the URL.createObjectURL(blob) method, the file will be downloaded directly. However, the downside is that it only supports small file downloads. How can we solve this without changing the backend? StreamSaver.js was created to address this issue.

Principle

StreamSaver.js uses ServiceWorker to intercept requests. If the result of the request is a stream, it can be continuously written to the local browser side. This breaks the limitation of JS single-thread, allowing large file downloads without blocking the thread.

Usage

1
2
3
4
5
6
7
8
9
10
import streamSaver from 'streamsaver';

streamSaver.mitm = 'https://example.com/custom_mitm.html';

const fileStream = streamSaver.createWriteStream('hello.mkv', { size: 10_000_000 });
const fileWriter = fileStream.getWriter();

fileWriter.write(new Uint8Array(chunk));

fileWriter.close();
Read more »

Due to work needs, I have used many terminals, such as iTerm2, Warp, Tabby, Hyper, etc.

Recently, I researched Wave Terminal and found some highlights, so I’ll introduce it here.

Platform

Wave is a local terminal, not web-based, currently supporting.

  1. Mac (M series also supported)
  2. Linux
  3. Windows WSL (Windows is also supported!)
Read more »

OpenAI released GPT-4o mini. After quickly using it, here is an introduction to its basic features.

Goal

The launch of the GPT-4o mini is to replace the GPT-3.5, as it is 60% cheaper than the 3.5 and smarter. Therefore, all scenarios where we used GPT-3.5 can be directly switched to GPT-4o mini.

Read more »

This year, I’ve enjoyed using Duolingo. While it hasn’t significantly improved my skills, it has helped me consolidate basic vocabulary and improve my listening skills. Plus, it doesn’t take much time, averaging just a few to a dozen minutes daily.

Here, I’ll introduce how I use Duolingo.

Platform

Duolingo is cross-platform, supporting Android, iOS, and the Web. There is no Mac version.

I mostly use the iOS version, with the Web version as my secondary choice.

Free or Paid Service?

Read more »

After upgrading ChatGPT iOS today, I found that it supports Background Conversations. After trying it out quickly, I think it’s amazing.

Here is an guide on how to use the feature.

Requirement

  1. Currently, there are no restrictions. It’s just in the rolling out. If you don’t see the setting yet, please be patient.

  2. It’s recommended to upgrade the app to the latest version. I have upgraded to 1.2024.150 on iOS.

Enable Background Conversations

You can see the option in the settings, turn it on.

Read more »
0%