Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · The Earth-orbit catalogue: orbit class, object kind, colours, fleets and the packed file format (no data)

unpackAnyfunction

Read a packed file whether or not it is gzipped (gzip is found from its first two bytes). The unpacked size is capped at MAX_PACKED_BYTES, so a small file that unpacks to a huge one is refused.

Import it

import { unpackAny } from "@johnmorrisdotca/chikyu-earth/catalogue";

Definition

function unpackAny(bytes: Uint8Array): Promise<PackedCatalogue>

Parameters

NameTypeDescription
bytesUint8Array<ArrayBufferLike>

A packed file, or a gzipped one.

Returns

Promise<PackedCatalogue>

The records, by column.

Examples

import { gzipBytes, packCatalogue, unpackAny } from "@johnmorrisdotca/chikyu-earth/catalogue";

const file = await unpackAny(await gzipBytes(packCatalogue([], { group: "empty" })));
console.log(file.count, file.meta["group"]);
0 empty

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.