Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
CGJennings committed Jan 27, 2024
1 parent 0ba309a commit f684a67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async function loadTernaryStringSet(url) {
if (!response.ok) {
throw new Error(`set download "${url}" failed: ${response.status} ${response.statusText}`);
}
const buffer = await resonse.arrayBuffer();
const buffer = await response.arrayBuffer();
return TernaryStringSet.fromBuffer(buffer);
}
```
Expand Down Expand Up @@ -303,7 +303,7 @@ Compaction is relatively expensive, but can be a one-time or ahead-of-time step

A common use case is to match user input against a fixed set of strings.
For example, checking input against a spelling dictionary or suggesting completions for partial input.
In such cases it is often desirable to build a set ahead of time, serialize it to a buffer, and then save the buffer data on a server to downloaded when needed.
In such cases it is often desirable to build a set ahead of time, serialize it to a buffer, and then save the buffer data on a server to download when needed.
Recreating a set directly from buffer data is generally much faster than downloading a file containing the strings and adding them to a new set on the client.

The following steps will make such ahead-of-time sets as small as possible:
Expand Down Expand Up @@ -436,7 +436,7 @@ Code points in this range are written as an int16 value.
The lowest 15 bits store the code point and the highest bit is set if the node terminates a string.

**Encoding bits 10: code point ≤ 127**
Small code points are written as a single int8 value.
Low code points are written as a single int8 value.
The lowest 7 bits store the code point and the highest bit is set if the node terminates a string.

**Encoding bits 11: letter "e"**
Expand Down Expand Up @@ -485,4 +485,4 @@ The current version of the file format is 3. Version 1 and 2 files differ in the
For each node, an int32 is written for each of the node value and three branch pointers.
Pointers are *not* divided by 4.
3. In version 2 files, the *16-bit branch* tree flag may be set.
In this case, *all* branch pointers are int16 values instead of int32 values; 0xffff indicates NUL.
In this case, *all* branch pointers are int16 values instead of int32 values; 0xffff indicates NUL.

0 comments on commit f684a67

Please sign in to comment.