refactor: performance optimizations

also renamed some internal types, and adding more code comments. (not thoroughly tested yet)
This commit is contained in:
Simon Chan 2024-05-04 23:47:52 +08:00
parent 65b8671b66
commit 8223d79886
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
49 changed files with 932 additions and 767 deletions

View file

@ -353,6 +353,7 @@ export async function deserializeAndroidLogEntry(
): Promise<AndroidLogEntry> {
const entry = (await LoggerEntry.deserialize(stream)) as AndroidLogEntry;
if (entry.headerSize !== LoggerEntry.size) {
// Skip unknown fields
await stream.readExactly(entry.headerSize - LoggerEntry.size);
}