gitx.do 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -353
- package/dist/do/logger.d.ts +50 -0
- package/dist/do/logger.d.ts.map +1 -0
- package/dist/do/logger.js +122 -0
- package/dist/do/logger.js.map +1 -0
- package/dist/{durable-object → do}/schema.d.ts +3 -3
- package/dist/do/schema.d.ts.map +1 -0
- package/dist/{durable-object → do}/schema.js +4 -3
- package/dist/do/schema.js.map +1 -0
- package/dist/do/types.d.ts +267 -0
- package/dist/do/types.d.ts.map +1 -0
- package/dist/do/types.js +62 -0
- package/dist/do/types.js.map +1 -0
- package/dist/index.d.ts +14 -469
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -483
- package/dist/index.js.map +1 -1
- package/package.json +13 -21
- package/dist/cli/commands/add.d.ts +0 -176
- package/dist/cli/commands/add.d.ts.map +0 -1
- package/dist/cli/commands/add.js +0 -979
- package/dist/cli/commands/add.js.map +0 -1
- package/dist/cli/commands/blame.d.ts +0 -259
- package/dist/cli/commands/blame.d.ts.map +0 -1
- package/dist/cli/commands/blame.js +0 -609
- package/dist/cli/commands/blame.js.map +0 -1
- package/dist/cli/commands/branch.d.ts +0 -249
- package/dist/cli/commands/branch.d.ts.map +0 -1
- package/dist/cli/commands/branch.js +0 -693
- package/dist/cli/commands/branch.js.map +0 -1
- package/dist/cli/commands/checkout.d.ts +0 -73
- package/dist/cli/commands/checkout.d.ts.map +0 -1
- package/dist/cli/commands/checkout.js +0 -725
- package/dist/cli/commands/checkout.js.map +0 -1
- package/dist/cli/commands/commit.d.ts +0 -182
- package/dist/cli/commands/commit.d.ts.map +0 -1
- package/dist/cli/commands/commit.js +0 -457
- package/dist/cli/commands/commit.js.map +0 -1
- package/dist/cli/commands/diff.d.ts +0 -464
- package/dist/cli/commands/diff.d.ts.map +0 -1
- package/dist/cli/commands/diff.js +0 -959
- package/dist/cli/commands/diff.js.map +0 -1
- package/dist/cli/commands/log.d.ts +0 -239
- package/dist/cli/commands/log.d.ts.map +0 -1
- package/dist/cli/commands/log.js +0 -535
- package/dist/cli/commands/log.js.map +0 -1
- package/dist/cli/commands/merge.d.ts +0 -106
- package/dist/cli/commands/merge.d.ts.map +0 -1
- package/dist/cli/commands/merge.js +0 -852
- package/dist/cli/commands/merge.js.map +0 -1
- package/dist/cli/commands/review.d.ts +0 -457
- package/dist/cli/commands/review.d.ts.map +0 -1
- package/dist/cli/commands/review.js +0 -558
- package/dist/cli/commands/review.js.map +0 -1
- package/dist/cli/commands/stash.d.ts +0 -157
- package/dist/cli/commands/stash.d.ts.map +0 -1
- package/dist/cli/commands/stash.js +0 -655
- package/dist/cli/commands/stash.js.map +0 -1
- package/dist/cli/commands/status.d.ts +0 -269
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js +0 -492
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/web.d.ts +0 -199
- package/dist/cli/commands/web.d.ts.map +0 -1
- package/dist/cli/commands/web.js +0 -697
- package/dist/cli/commands/web.js.map +0 -1
- package/dist/cli/fs-adapter.d.ts +0 -656
- package/dist/cli/fs-adapter.d.ts.map +0 -1
- package/dist/cli/fs-adapter.js +0 -1177
- package/dist/cli/fs-adapter.js.map +0 -1
- package/dist/cli/fsx-cli-adapter.d.ts +0 -359
- package/dist/cli/fsx-cli-adapter.d.ts.map +0 -1
- package/dist/cli/fsx-cli-adapter.js +0 -619
- package/dist/cli/fsx-cli-adapter.js.map +0 -1
- package/dist/cli/index.d.ts +0 -387
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -579
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/ui/components/DiffView.d.ts +0 -12
- package/dist/cli/ui/components/DiffView.d.ts.map +0 -1
- package/dist/cli/ui/components/DiffView.js +0 -11
- package/dist/cli/ui/components/DiffView.js.map +0 -1
- package/dist/cli/ui/components/ErrorDisplay.d.ts +0 -10
- package/dist/cli/ui/components/ErrorDisplay.d.ts.map +0 -1
- package/dist/cli/ui/components/ErrorDisplay.js +0 -11
- package/dist/cli/ui/components/ErrorDisplay.js.map +0 -1
- package/dist/cli/ui/components/FuzzySearch.d.ts +0 -15
- package/dist/cli/ui/components/FuzzySearch.d.ts.map +0 -1
- package/dist/cli/ui/components/FuzzySearch.js +0 -12
- package/dist/cli/ui/components/FuzzySearch.js.map +0 -1
- package/dist/cli/ui/components/LoadingSpinner.d.ts +0 -10
- package/dist/cli/ui/components/LoadingSpinner.d.ts.map +0 -1
- package/dist/cli/ui/components/LoadingSpinner.js +0 -10
- package/dist/cli/ui/components/LoadingSpinner.js.map +0 -1
- package/dist/cli/ui/components/NavigationList.d.ts +0 -14
- package/dist/cli/ui/components/NavigationList.d.ts.map +0 -1
- package/dist/cli/ui/components/NavigationList.js +0 -11
- package/dist/cli/ui/components/NavigationList.js.map +0 -1
- package/dist/cli/ui/components/ScrollableContent.d.ts +0 -13
- package/dist/cli/ui/components/ScrollableContent.d.ts.map +0 -1
- package/dist/cli/ui/components/ScrollableContent.js +0 -11
- package/dist/cli/ui/components/ScrollableContent.js.map +0 -1
- package/dist/cli/ui/components/index.d.ts +0 -7
- package/dist/cli/ui/components/index.d.ts.map +0 -1
- package/dist/cli/ui/components/index.js +0 -9
- package/dist/cli/ui/components/index.js.map +0 -1
- package/dist/cli/ui/terminal-ui.d.ts +0 -85
- package/dist/cli/ui/terminal-ui.d.ts.map +0 -1
- package/dist/cli/ui/terminal-ui.js +0 -121
- package/dist/cli/ui/terminal-ui.js.map +0 -1
- package/dist/do/BashModule.d.ts +0 -871
- package/dist/do/BashModule.d.ts.map +0 -1
- package/dist/do/BashModule.js +0 -1143
- package/dist/do/BashModule.js.map +0 -1
- package/dist/do/FsModule.d.ts +0 -612
- package/dist/do/FsModule.d.ts.map +0 -1
- package/dist/do/FsModule.js +0 -1120
- package/dist/do/FsModule.js.map +0 -1
- package/dist/do/GitModule.d.ts +0 -635
- package/dist/do/GitModule.d.ts.map +0 -1
- package/dist/do/GitModule.js +0 -784
- package/dist/do/GitModule.js.map +0 -1
- package/dist/do/GitRepoDO.d.ts +0 -281
- package/dist/do/GitRepoDO.d.ts.map +0 -1
- package/dist/do/GitRepoDO.js +0 -479
- package/dist/do/GitRepoDO.js.map +0 -1
- package/dist/do/bash-ast.d.ts +0 -246
- package/dist/do/bash-ast.d.ts.map +0 -1
- package/dist/do/bash-ast.js +0 -888
- package/dist/do/bash-ast.js.map +0 -1
- package/dist/do/container-executor.d.ts +0 -491
- package/dist/do/container-executor.d.ts.map +0 -1
- package/dist/do/container-executor.js +0 -731
- package/dist/do/container-executor.js.map +0 -1
- package/dist/do/index.d.ts +0 -53
- package/dist/do/index.d.ts.map +0 -1
- package/dist/do/index.js +0 -91
- package/dist/do/index.js.map +0 -1
- package/dist/do/tiered-storage.d.ts +0 -403
- package/dist/do/tiered-storage.d.ts.map +0 -1
- package/dist/do/tiered-storage.js +0 -689
- package/dist/do/tiered-storage.js.map +0 -1
- package/dist/do/withBash.d.ts +0 -231
- package/dist/do/withBash.d.ts.map +0 -1
- package/dist/do/withBash.js +0 -244
- package/dist/do/withBash.js.map +0 -1
- package/dist/do/withFs.d.ts +0 -237
- package/dist/do/withFs.d.ts.map +0 -1
- package/dist/do/withFs.js +0 -387
- package/dist/do/withFs.js.map +0 -1
- package/dist/do/withGit.d.ts +0 -180
- package/dist/do/withGit.d.ts.map +0 -1
- package/dist/do/withGit.js +0 -271
- package/dist/do/withGit.js.map +0 -1
- package/dist/durable-object/object-store.d.ts +0 -633
- package/dist/durable-object/object-store.d.ts.map +0 -1
- package/dist/durable-object/object-store.js +0 -1164
- package/dist/durable-object/object-store.js.map +0 -1
- package/dist/durable-object/schema.d.ts.map +0 -1
- package/dist/durable-object/schema.js.map +0 -1
- package/dist/durable-object/wal.d.ts +0 -416
- package/dist/durable-object/wal.d.ts.map +0 -1
- package/dist/durable-object/wal.js +0 -445
- package/dist/durable-object/wal.js.map +0 -1
- package/dist/mcp/adapter.d.ts +0 -772
- package/dist/mcp/adapter.d.ts.map +0 -1
- package/dist/mcp/adapter.js +0 -895
- package/dist/mcp/adapter.js.map +0 -1
- package/dist/mcp/sandbox/miniflare-evaluator.d.ts +0 -22
- package/dist/mcp/sandbox/miniflare-evaluator.d.ts.map +0 -1
- package/dist/mcp/sandbox/miniflare-evaluator.js +0 -140
- package/dist/mcp/sandbox/miniflare-evaluator.js.map +0 -1
- package/dist/mcp/sandbox/object-store-proxy.d.ts +0 -32
- package/dist/mcp/sandbox/object-store-proxy.d.ts.map +0 -1
- package/dist/mcp/sandbox/object-store-proxy.js +0 -30
- package/dist/mcp/sandbox/object-store-proxy.js.map +0 -1
- package/dist/mcp/sandbox/template.d.ts +0 -17
- package/dist/mcp/sandbox/template.d.ts.map +0 -1
- package/dist/mcp/sandbox/template.js +0 -71
- package/dist/mcp/sandbox/template.js.map +0 -1
- package/dist/mcp/sandbox.d.ts +0 -764
- package/dist/mcp/sandbox.d.ts.map +0 -1
- package/dist/mcp/sandbox.js +0 -1362
- package/dist/mcp/sandbox.js.map +0 -1
- package/dist/mcp/sdk-adapter.d.ts +0 -835
- package/dist/mcp/sdk-adapter.d.ts.map +0 -1
- package/dist/mcp/sdk-adapter.js +0 -974
- package/dist/mcp/sdk-adapter.js.map +0 -1
- package/dist/mcp/tools/do.d.ts +0 -32
- package/dist/mcp/tools/do.d.ts.map +0 -1
- package/dist/mcp/tools/do.js +0 -117
- package/dist/mcp/tools/do.js.map +0 -1
- package/dist/mcp/tools.d.ts +0 -548
- package/dist/mcp/tools.d.ts.map +0 -1
- package/dist/mcp/tools.js +0 -3170
- package/dist/mcp/tools.js.map +0 -1
- package/dist/ops/blame.d.ts +0 -551
- package/dist/ops/blame.d.ts.map +0 -1
- package/dist/ops/blame.js +0 -1037
- package/dist/ops/blame.js.map +0 -1
- package/dist/ops/branch.d.ts +0 -766
- package/dist/ops/branch.d.ts.map +0 -1
- package/dist/ops/branch.js +0 -950
- package/dist/ops/branch.js.map +0 -1
- package/dist/ops/commit-traversal.d.ts +0 -349
- package/dist/ops/commit-traversal.d.ts.map +0 -1
- package/dist/ops/commit-traversal.js +0 -821
- package/dist/ops/commit-traversal.js.map +0 -1
- package/dist/ops/commit.d.ts +0 -555
- package/dist/ops/commit.d.ts.map +0 -1
- package/dist/ops/commit.js +0 -826
- package/dist/ops/commit.js.map +0 -1
- package/dist/ops/merge-base.d.ts +0 -397
- package/dist/ops/merge-base.d.ts.map +0 -1
- package/dist/ops/merge-base.js +0 -691
- package/dist/ops/merge-base.js.map +0 -1
- package/dist/ops/merge.d.ts +0 -855
- package/dist/ops/merge.d.ts.map +0 -1
- package/dist/ops/merge.js +0 -1551
- package/dist/ops/merge.js.map +0 -1
- package/dist/ops/tag.d.ts +0 -247
- package/dist/ops/tag.d.ts.map +0 -1
- package/dist/ops/tag.js +0 -649
- package/dist/ops/tag.js.map +0 -1
- package/dist/ops/tree-builder.d.ts +0 -178
- package/dist/ops/tree-builder.d.ts.map +0 -1
- package/dist/ops/tree-builder.js +0 -271
- package/dist/ops/tree-builder.js.map +0 -1
- package/dist/ops/tree-diff.d.ts +0 -291
- package/dist/ops/tree-diff.d.ts.map +0 -1
- package/dist/ops/tree-diff.js +0 -705
- package/dist/ops/tree-diff.js.map +0 -1
- package/dist/pack/delta.d.ts +0 -248
- package/dist/pack/delta.d.ts.map +0 -1
- package/dist/pack/delta.js +0 -740
- package/dist/pack/delta.js.map +0 -1
- package/dist/pack/format.d.ts +0 -446
- package/dist/pack/format.d.ts.map +0 -1
- package/dist/pack/format.js +0 -572
- package/dist/pack/format.js.map +0 -1
- package/dist/pack/full-generation.d.ts +0 -612
- package/dist/pack/full-generation.d.ts.map +0 -1
- package/dist/pack/full-generation.js +0 -1378
- package/dist/pack/full-generation.js.map +0 -1
- package/dist/pack/generation.d.ts +0 -441
- package/dist/pack/generation.d.ts.map +0 -1
- package/dist/pack/generation.js +0 -707
- package/dist/pack/generation.js.map +0 -1
- package/dist/pack/index.d.ts +0 -502
- package/dist/pack/index.d.ts.map +0 -1
- package/dist/pack/index.js +0 -833
- package/dist/pack/index.js.map +0 -1
- package/dist/refs/branch.d.ts +0 -683
- package/dist/refs/branch.d.ts.map +0 -1
- package/dist/refs/branch.js +0 -881
- package/dist/refs/branch.js.map +0 -1
- package/dist/refs/storage.d.ts +0 -833
- package/dist/refs/storage.d.ts.map +0 -1
- package/dist/refs/storage.js +0 -1023
- package/dist/refs/storage.js.map +0 -1
- package/dist/refs/tag.d.ts +0 -860
- package/dist/refs/tag.d.ts.map +0 -1
- package/dist/refs/tag.js +0 -996
- package/dist/refs/tag.js.map +0 -1
- package/dist/storage/backend.d.ts +0 -425
- package/dist/storage/backend.d.ts.map +0 -1
- package/dist/storage/backend.js +0 -41
- package/dist/storage/backend.js.map +0 -1
- package/dist/storage/fsx-adapter.d.ts +0 -204
- package/dist/storage/fsx-adapter.d.ts.map +0 -1
- package/dist/storage/fsx-adapter.js +0 -518
- package/dist/storage/fsx-adapter.js.map +0 -1
- package/dist/storage/lru-cache.d.ts +0 -691
- package/dist/storage/lru-cache.d.ts.map +0 -1
- package/dist/storage/lru-cache.js +0 -813
- package/dist/storage/lru-cache.js.map +0 -1
- package/dist/storage/object-index.d.ts +0 -585
- package/dist/storage/object-index.d.ts.map +0 -1
- package/dist/storage/object-index.js +0 -532
- package/dist/storage/object-index.js.map +0 -1
- package/dist/storage/r2-pack.d.ts +0 -1257
- package/dist/storage/r2-pack.d.ts.map +0 -1
- package/dist/storage/r2-pack.js +0 -1773
- package/dist/storage/r2-pack.js.map +0 -1
- package/dist/tiered/cdc-pipeline.d.ts +0 -1888
- package/dist/tiered/cdc-pipeline.d.ts.map +0 -1
- package/dist/tiered/cdc-pipeline.js +0 -1880
- package/dist/tiered/cdc-pipeline.js.map +0 -1
- package/dist/tiered/migration.d.ts +0 -1104
- package/dist/tiered/migration.d.ts.map +0 -1
- package/dist/tiered/migration.js +0 -1217
- package/dist/tiered/migration.js.map +0 -1
- package/dist/tiered/parquet-writer.d.ts +0 -1145
- package/dist/tiered/parquet-writer.d.ts.map +0 -1
- package/dist/tiered/parquet-writer.js +0 -1183
- package/dist/tiered/parquet-writer.js.map +0 -1
- package/dist/tiered/read-path.d.ts +0 -835
- package/dist/tiered/read-path.d.ts.map +0 -1
- package/dist/tiered/read-path.js +0 -487
- package/dist/tiered/read-path.js.map +0 -1
- package/dist/types/capability.d.ts +0 -1385
- package/dist/types/capability.d.ts.map +0 -1
- package/dist/types/capability.js +0 -36
- package/dist/types/capability.js.map +0 -1
- package/dist/types/index.d.ts +0 -13
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -18
- package/dist/types/index.js.map +0 -1
- package/dist/types/interfaces.d.ts +0 -673
- package/dist/types/interfaces.d.ts.map +0 -1
- package/dist/types/interfaces.js +0 -26
- package/dist/types/interfaces.js.map +0 -1
- package/dist/types/objects.d.ts +0 -692
- package/dist/types/objects.d.ts.map +0 -1
- package/dist/types/objects.js +0 -837
- package/dist/types/objects.js.map +0 -1
- package/dist/types/storage.d.ts +0 -603
- package/dist/types/storage.d.ts.map +0 -1
- package/dist/types/storage.js +0 -191
- package/dist/types/storage.js.map +0 -1
- package/dist/types/worker-loader.d.ts +0 -60
- package/dist/types/worker-loader.d.ts.map +0 -1
- package/dist/types/worker-loader.js +0 -62
- package/dist/types/worker-loader.js.map +0 -1
- package/dist/utils/hash.d.ts +0 -198
- package/dist/utils/hash.d.ts.map +0 -1
- package/dist/utils/hash.js +0 -272
- package/dist/utils/hash.js.map +0 -1
- package/dist/utils/sha1.d.ts +0 -325
- package/dist/utils/sha1.d.ts.map +0 -1
- package/dist/utils/sha1.js +0 -635
- package/dist/utils/sha1.js.map +0 -1
- package/dist/wire/capabilities.d.ts +0 -1044
- package/dist/wire/capabilities.d.ts.map +0 -1
- package/dist/wire/capabilities.js +0 -941
- package/dist/wire/capabilities.js.map +0 -1
- package/dist/wire/path-security.d.ts +0 -157
- package/dist/wire/path-security.d.ts.map +0 -1
- package/dist/wire/path-security.js +0 -307
- package/dist/wire/path-security.js.map +0 -1
- package/dist/wire/pkt-line.d.ts +0 -345
- package/dist/wire/pkt-line.d.ts.map +0 -1
- package/dist/wire/pkt-line.js +0 -381
- package/dist/wire/pkt-line.js.map +0 -1
- package/dist/wire/receive-pack.d.ts +0 -1059
- package/dist/wire/receive-pack.d.ts.map +0 -1
- package/dist/wire/receive-pack.js +0 -1414
- package/dist/wire/receive-pack.js.map +0 -1
- package/dist/wire/smart-http.d.ts +0 -799
- package/dist/wire/smart-http.d.ts.map +0 -1
- package/dist/wire/smart-http.js +0 -945
- package/dist/wire/smart-http.js.map +0 -1
- package/dist/wire/upload-pack.d.ts +0 -727
- package/dist/wire/upload-pack.d.ts.map +0 -1
- package/dist/wire/upload-pack.js +0 -1141
- package/dist/wire/upload-pack.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generation.js","sourceRoot":"","sources":["../../src/pack/generation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AA4LpC,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAgB;IAClD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAA;AACnB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,gBAAgB,CAAC,WAAmB;IAC3C,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAA;IACjC,oBAAoB;IACpB,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA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;QACnB,QAAQ;QACR,MAAM;QACN,YAAY;QACZ,KAAK,EAAE;YACL,YAAY,EAAE,OAAO,CAAC,MAAM;YAC5B,YAAY,EAAE,UAAU;YACxB,SAAS;YACT,cAAc;YACd,aAAa,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACrC,gBAAgB;SACjB;KACF,CAAA;AACH,CAAC"}
|
package/dist/pack/index.d.ts
DELETED
|
@@ -1,502 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Git Pack Index (.idx) File Format Implementation
|
|
3
|
-
*
|
|
4
|
-
* This module implements the Git pack index (version 2) format, which provides
|
|
5
|
-
* efficient random access to objects within a packfile. Without an index, finding
|
|
6
|
-
* an object in a packfile would require scanning the entire file.
|
|
7
|
-
*
|
|
8
|
-
* ## Pack Index Version 2 Structure
|
|
9
|
-
*
|
|
10
|
-
* | Section | Size | Description |
|
|
11
|
-
* |------------------------|-------------------------|--------------------------------------------|
|
|
12
|
-
* | Magic number | 4 bytes | 0xff744f63 ("\377tOc") |
|
|
13
|
-
* | Version | 4 bytes | Version number (2) |
|
|
14
|
-
* | Fanout table | 256 * 4 bytes | Cumulative object counts by first SHA byte |
|
|
15
|
-
* | Object IDs | N * 20 bytes | Sorted SHA-1 hashes |
|
|
16
|
-
* | CRC32 checksums | N * 4 bytes | CRC32 of each packed object |
|
|
17
|
-
* | 4-byte offsets | N * 4 bytes | Pack file offsets (or large offset index) |
|
|
18
|
-
* | 8-byte large offsets | M * 8 bytes | For objects beyond 2GB |
|
|
19
|
-
* | Packfile checksum | 20 bytes | SHA-1 of the corresponding packfile |
|
|
20
|
-
* | Index checksum | 20 bytes | SHA-1 of this index file |
|
|
21
|
-
*
|
|
22
|
-
* ## Fanout Table
|
|
23
|
-
*
|
|
24
|
-
* The fanout table enables O(1) lookup of the range of objects starting with a given
|
|
25
|
-
* byte value. `fanout[i]` contains the cumulative count of objects whose SHA-1 hash
|
|
26
|
-
* starts with a byte <= i. This enables binary search within a narrow range.
|
|
27
|
-
*
|
|
28
|
-
* ## Large Offset Handling
|
|
29
|
-
*
|
|
30
|
-
* For packfiles larger than 2GB, offsets that don't fit in 4 bytes are stored in
|
|
31
|
-
* a separate 8-byte table. The 4-byte offset slot contains an index into this table
|
|
32
|
-
* with the MSB set to indicate it's an indirect reference.
|
|
33
|
-
*
|
|
34
|
-
* @module pack/index
|
|
35
|
-
* @see {@link https://git-scm.com/docs/pack-format} Git Pack Format Documentation
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* // Parse an existing pack index
|
|
39
|
-
* import { parsePackIndex, lookupObject } from './index';
|
|
40
|
-
*
|
|
41
|
-
* const indexData = await readFile('objects/pack/pack-abc123.idx');
|
|
42
|
-
* const index = parsePackIndex(indexData);
|
|
43
|
-
*
|
|
44
|
-
* const entry = lookupObject(index, 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3');
|
|
45
|
-
* if (entry) {
|
|
46
|
-
* console.log(`Object at offset ${entry.offset}`);
|
|
47
|
-
* }
|
|
48
|
-
*/
|
|
49
|
-
import { PackObjectType } from './format';
|
|
50
|
-
/**
|
|
51
|
-
* The 4-byte signature that identifies a version 2 pack index file.
|
|
52
|
-
* The bytes are: 0xff 0x74 0x4f 0x63 (representing "\377tOc").
|
|
53
|
-
*
|
|
54
|
-
* Version 1 index files don't have this signature and start directly
|
|
55
|
-
* with the fanout table.
|
|
56
|
-
*
|
|
57
|
-
* @constant {Uint8Array}
|
|
58
|
-
*/
|
|
59
|
-
export declare const PACK_INDEX_SIGNATURE: Uint8Array<ArrayBuffer>;
|
|
60
|
-
/**
|
|
61
|
-
* The magic number as a 32-bit integer for easy comparison.
|
|
62
|
-
* Equivalent to reading the first 4 bytes as big-endian uint32.
|
|
63
|
-
*
|
|
64
|
-
* @constant {number}
|
|
65
|
-
*/
|
|
66
|
-
export declare const PACK_INDEX_MAGIC = 4285812579;
|
|
67
|
-
/**
|
|
68
|
-
* The pack index version number supported by this implementation.
|
|
69
|
-
* Version 2 is the current standard and supports large packfiles (>2GB).
|
|
70
|
-
*
|
|
71
|
-
* @constant {number}
|
|
72
|
-
*/
|
|
73
|
-
export declare const PACK_INDEX_VERSION = 2;
|
|
74
|
-
/**
|
|
75
|
-
* The byte threshold for using large offset encoding.
|
|
76
|
-
* Offsets >= 2GB (0x80000000) require 8-byte storage.
|
|
77
|
-
* In the 4-byte offset table, values with MSB set are indices
|
|
78
|
-
* into the large offset table instead of direct offsets.
|
|
79
|
-
*
|
|
80
|
-
* @constant {number}
|
|
81
|
-
*/
|
|
82
|
-
export declare const LARGE_OFFSET_THRESHOLD = 2147483648;
|
|
83
|
-
/**
|
|
84
|
-
* Represents a single entry in the pack index.
|
|
85
|
-
*
|
|
86
|
-
* @description Each entry contains the information needed to locate and verify
|
|
87
|
-
* an object within the packfile. The pack index stores one entry per object,
|
|
88
|
-
* sorted by object ID for efficient binary search.
|
|
89
|
-
*
|
|
90
|
-
* @interface PackIndexEntry
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* const entry: PackIndexEntry = {
|
|
94
|
-
* objectId: 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',
|
|
95
|
-
* crc32: 0x12345678,
|
|
96
|
-
* offset: 1024
|
|
97
|
-
* };
|
|
98
|
-
*/
|
|
99
|
-
export interface PackIndexEntry {
|
|
100
|
-
/**
|
|
101
|
-
* The 40-character hexadecimal SHA-1 object ID.
|
|
102
|
-
* This is the primary identifier for the object.
|
|
103
|
-
*/
|
|
104
|
-
objectId?: string;
|
|
105
|
-
/**
|
|
106
|
-
* Alias for objectId, provided for backward compatibility.
|
|
107
|
-
* @deprecated Use objectId instead
|
|
108
|
-
*/
|
|
109
|
-
sha?: string;
|
|
110
|
-
/**
|
|
111
|
-
* CRC32 checksum of the packed (compressed) object data.
|
|
112
|
-
* Used to verify integrity without full decompression.
|
|
113
|
-
*/
|
|
114
|
-
crc32: number;
|
|
115
|
-
/**
|
|
116
|
-
* Byte offset of the object within the packfile.
|
|
117
|
-
* For large packfiles (>2GB), this may exceed 32-bit range.
|
|
118
|
-
*/
|
|
119
|
-
offset: number;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Represents a fully parsed pack index file.
|
|
123
|
-
*
|
|
124
|
-
* @description Contains all the information extracted from a .idx file,
|
|
125
|
-
* including the fanout table for efficient lookups and all object entries.
|
|
126
|
-
* This structure enables O(log n) object lookups using binary search.
|
|
127
|
-
*
|
|
128
|
-
* @interface PackIndex
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* // Parse and use a pack index
|
|
132
|
-
* const index: PackIndex = parsePackIndex(indexData);
|
|
133
|
-
* console.log(`Index contains ${index.objectCount} objects`);
|
|
134
|
-
*
|
|
135
|
-
* // Look up an object
|
|
136
|
-
* const entry = lookupObject(index, objectSha);
|
|
137
|
-
*/
|
|
138
|
-
export interface PackIndex {
|
|
139
|
-
/** Version number of the index format (should always be 2) */
|
|
140
|
-
version: number;
|
|
141
|
-
/** Total number of objects indexed (equals fanout[255]) */
|
|
142
|
-
objectCount: number;
|
|
143
|
-
/**
|
|
144
|
-
* The 256-entry fanout table for O(1) range lookup.
|
|
145
|
-
* fanout[i] = cumulative count of objects whose first SHA byte is <= i.
|
|
146
|
-
* Used to narrow binary search to objects starting with a specific byte.
|
|
147
|
-
*/
|
|
148
|
-
fanout: Uint32Array;
|
|
149
|
-
/** Array of all index entries, sorted lexicographically by object ID */
|
|
150
|
-
entries: PackIndexEntry[];
|
|
151
|
-
/** SHA-1 checksum of the corresponding packfile (from pack trailer) */
|
|
152
|
-
packChecksum: Uint8Array;
|
|
153
|
-
/** SHA-1 checksum of this index file (for integrity verification) */
|
|
154
|
-
indexChecksum: Uint8Array;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Result of looking up an object in the pack index.
|
|
158
|
-
*
|
|
159
|
-
* @description Returned by lookup operations to indicate whether an object
|
|
160
|
-
* was found and provide its entry information if so.
|
|
161
|
-
*
|
|
162
|
-
* @interface PackIndexLookupResult
|
|
163
|
-
*/
|
|
164
|
-
export interface PackIndexLookupResult {
|
|
165
|
-
/** Whether the object was found in the index */
|
|
166
|
-
found: boolean;
|
|
167
|
-
/** The full entry if found, undefined otherwise */
|
|
168
|
-
entry?: PackIndexEntry;
|
|
169
|
-
/** Zero-based position in the sorted entry list (useful for iteration) */
|
|
170
|
-
position?: number;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Options for creating a pack index from a packfile.
|
|
174
|
-
*
|
|
175
|
-
* @description Configuration options passed to {@link createPackIndex}
|
|
176
|
-
* when generating an index file from packfile data.
|
|
177
|
-
*
|
|
178
|
-
* @interface CreatePackIndexOptions
|
|
179
|
-
*/
|
|
180
|
-
export interface CreatePackIndexOptions {
|
|
181
|
-
/** The complete packfile binary data to create an index for */
|
|
182
|
-
packData: Uint8Array;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Represents a parsed object from a packfile, used during indexing.
|
|
186
|
-
*
|
|
187
|
-
* @description Contains all the metadata needed to create an index entry
|
|
188
|
-
* for an object. This is typically populated when parsing through a packfile
|
|
189
|
-
* to build an index.
|
|
190
|
-
*
|
|
191
|
-
* @interface PackedObject
|
|
192
|
-
*/
|
|
193
|
-
export interface PackedObject {
|
|
194
|
-
/** The 40-character hexadecimal SHA-1 hash identifying this object */
|
|
195
|
-
objectId: string;
|
|
196
|
-
/** The object type (commit, tree, blob, tag, or delta) */
|
|
197
|
-
type: PackObjectType;
|
|
198
|
-
/** Uncompressed size of the object data in bytes */
|
|
199
|
-
size: number;
|
|
200
|
-
/** Byte offset where this object starts in the packfile */
|
|
201
|
-
offset: number;
|
|
202
|
-
/** CRC32 checksum of the compressed object data (header + zlib stream) */
|
|
203
|
-
crc32: number;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Parses a pack index file (version 2 format).
|
|
207
|
-
*
|
|
208
|
-
* @description Parses the binary .idx file format and returns a structured
|
|
209
|
-
* representation of the pack index. The function validates:
|
|
210
|
-
* - Magic number and version
|
|
211
|
-
* - Fanout table monotonicity
|
|
212
|
-
* - Index checksum integrity
|
|
213
|
-
*
|
|
214
|
-
* **Performance:** This function parses the entire index into memory,
|
|
215
|
-
* which is suitable for most use cases. For very large indexes,
|
|
216
|
-
* consider streaming approaches.
|
|
217
|
-
*
|
|
218
|
-
* @param {Uint8Array} data - Raw bytes of the .idx file
|
|
219
|
-
* @returns {PackIndex} Fully parsed pack index structure
|
|
220
|
-
* @throws {Error} If the index data is too short
|
|
221
|
-
* @throws {Error} If the magic signature is invalid
|
|
222
|
-
* @throws {Error} If the version is not 2
|
|
223
|
-
* @throws {Error} If the fanout table is not monotonically non-decreasing
|
|
224
|
-
* @throws {Error} If the checksum verification fails
|
|
225
|
-
*
|
|
226
|
-
* @example
|
|
227
|
-
* // Parse an index file
|
|
228
|
-
* const indexData = await fs.readFile('pack-abc123.idx');
|
|
229
|
-
* const index = parsePackIndex(indexData);
|
|
230
|
-
*
|
|
231
|
-
* console.log(`Version: ${index.version}`);
|
|
232
|
-
* console.log(`Objects: ${index.objectCount}`);
|
|
233
|
-
*
|
|
234
|
-
* // Access entries
|
|
235
|
-
* for (const entry of index.entries) {
|
|
236
|
-
* console.log(`${entry.objectId} at offset ${entry.offset}`);
|
|
237
|
-
* }
|
|
238
|
-
*/
|
|
239
|
-
export declare function parsePackIndex(data: Uint8Array): PackIndex;
|
|
240
|
-
/**
|
|
241
|
-
* Creates a pack index file from packfile data or pre-computed entries.
|
|
242
|
-
*
|
|
243
|
-
* @description Generates a valid .idx file that can be used to efficiently
|
|
244
|
-
* locate objects within the corresponding packfile. Supports two calling conventions
|
|
245
|
-
* for backward compatibility.
|
|
246
|
-
*
|
|
247
|
-
* **Generated Index Structure:**
|
|
248
|
-
* - Version 2 header with magic number
|
|
249
|
-
* - Fanout table computed from entry SHA prefixes
|
|
250
|
-
* - Sorted object IDs (binary SHA-1)
|
|
251
|
-
* - CRC32 checksums from entries
|
|
252
|
-
* - Pack file offsets (4-byte or 8-byte for large files)
|
|
253
|
-
* - Pack checksum (from pack trailer)
|
|
254
|
-
* - Self-checksum (SHA-1 of entire index)
|
|
255
|
-
*
|
|
256
|
-
* @param {CreatePackIndexOptions | Uint8Array} optionsOrPackData - Either options object or packfile data (legacy)
|
|
257
|
-
* @param {PackIndexEntry[]} [legacyEntries] - Pre-computed entries when using legacy calling convention
|
|
258
|
-
* @returns {Uint8Array} Complete .idx file as binary data
|
|
259
|
-
*
|
|
260
|
-
* @example
|
|
261
|
-
* // New style: from options
|
|
262
|
-
* const indexData = createPackIndex({ packData: myPackfile });
|
|
263
|
-
*
|
|
264
|
-
* @example
|
|
265
|
-
* // Legacy style: with pre-computed entries
|
|
266
|
-
* const entries = [
|
|
267
|
-
* { objectId: 'abc123...', crc32: 0x12345678, offset: 100 }
|
|
268
|
-
* ];
|
|
269
|
-
* const indexData = createPackIndex(packData, entries);
|
|
270
|
-
*
|
|
271
|
-
* @example
|
|
272
|
-
* // Write index to disk alongside packfile
|
|
273
|
-
* const packName = 'pack-abc123';
|
|
274
|
-
* await fs.writeFile(`${packName}.pack`, packData);
|
|
275
|
-
* await fs.writeFile(`${packName}.idx`, createPackIndex({ packData }));
|
|
276
|
-
*/
|
|
277
|
-
export declare function createPackIndex(optionsOrPackData: CreatePackIndexOptions | Uint8Array, legacyEntries?: PackIndexEntry[]): Uint8Array;
|
|
278
|
-
/**
|
|
279
|
-
* Looks up an object in the pack index by its SHA-1 hash.
|
|
280
|
-
*
|
|
281
|
-
* @description Performs an efficient O(log n) lookup using the fanout table
|
|
282
|
-
* to narrow the search range, followed by binary search within that range.
|
|
283
|
-
*
|
|
284
|
-
* **Algorithm:**
|
|
285
|
-
* 1. Use the first byte of the SHA to find the range via fanout table - O(1)
|
|
286
|
-
* 2. Binary search within the range for exact match - O(log n)
|
|
287
|
-
*
|
|
288
|
-
* **Validation:**
|
|
289
|
-
* - SHA must be exactly 40 characters
|
|
290
|
-
* - SHA must contain valid hexadecimal characters
|
|
291
|
-
* - Comparison is case-insensitive
|
|
292
|
-
*
|
|
293
|
-
* @param {PackIndex} index - The parsed pack index to search
|
|
294
|
-
* @param {string} sha - The 40-character hexadecimal SHA-1 to find
|
|
295
|
-
* @returns {PackIndexEntry | null} The entry if found, or null if not present
|
|
296
|
-
* @throws {Error} If SHA is not exactly 40 characters
|
|
297
|
-
* @throws {Error} If SHA contains no valid hex characters
|
|
298
|
-
*
|
|
299
|
-
* @example
|
|
300
|
-
* // Look up an object
|
|
301
|
-
* const entry = lookupObject(index, 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3');
|
|
302
|
-
* if (entry) {
|
|
303
|
-
* console.log(`Found at offset ${entry.offset}`);
|
|
304
|
-
* } else {
|
|
305
|
-
* console.log('Object not in this pack');
|
|
306
|
-
* }
|
|
307
|
-
*
|
|
308
|
-
* @example
|
|
309
|
-
* // With error handling
|
|
310
|
-
* try {
|
|
311
|
-
* const entry = lookupObject(index, userInputSha);
|
|
312
|
-
* } catch (e) {
|
|
313
|
-
* console.error('Invalid SHA format:', e.message);
|
|
314
|
-
* }
|
|
315
|
-
*/
|
|
316
|
-
export declare function lookupObject(index: PackIndex, sha: string): PackIndexEntry | null;
|
|
317
|
-
/**
|
|
318
|
-
* Verifies the integrity of a pack index file.
|
|
319
|
-
*
|
|
320
|
-
* @description Performs comprehensive validation of a .idx file including:
|
|
321
|
-
* - Magic number verification (0xff744f63)
|
|
322
|
-
* - Version validation (must be 2)
|
|
323
|
-
* - Fanout table monotonicity check
|
|
324
|
-
* - Object ID sort order verification
|
|
325
|
-
* - SHA-1 checksum validation
|
|
326
|
-
*
|
|
327
|
-
* **Validation Order:**
|
|
328
|
-
* The function validates structural integrity before checking the checksum,
|
|
329
|
-
* allowing it to report more specific errors for corrupted data.
|
|
330
|
-
*
|
|
331
|
-
* @param {Uint8Array} data - Raw bytes of the .idx file
|
|
332
|
-
* @returns {boolean} True if all validation checks pass
|
|
333
|
-
* @throws {Error} If the index is too short
|
|
334
|
-
* @throws {Error} If the magic signature is invalid
|
|
335
|
-
* @throws {Error} If the version is not 2
|
|
336
|
-
* @throws {Error} If the fanout table is not monotonically non-decreasing
|
|
337
|
-
* @throws {Error} If object IDs are not in sorted order
|
|
338
|
-
* @throws {Error} If the checksum doesn't match
|
|
339
|
-
*
|
|
340
|
-
* @example
|
|
341
|
-
* // Verify before using an index
|
|
342
|
-
* try {
|
|
343
|
-
* if (verifyPackIndex(indexData)) {
|
|
344
|
-
* const index = parsePackIndex(indexData);
|
|
345
|
-
* // Safe to use index
|
|
346
|
-
* }
|
|
347
|
-
* } catch (e) {
|
|
348
|
-
* console.error('Corrupted index:', e.message);
|
|
349
|
-
* }
|
|
350
|
-
*
|
|
351
|
-
* @example
|
|
352
|
-
* // Quick validation check
|
|
353
|
-
* const isValid = (() => {
|
|
354
|
-
* try { return verifyPackIndex(data); }
|
|
355
|
-
* catch { return false; }
|
|
356
|
-
* })();
|
|
357
|
-
*/
|
|
358
|
-
export declare function verifyPackIndex(data: Uint8Array): boolean;
|
|
359
|
-
/**
|
|
360
|
-
* Gets the range of entries that could match a given first byte.
|
|
361
|
-
*
|
|
362
|
-
* @description Uses the fanout table to find the start and end indices
|
|
363
|
-
* for objects whose SHA-1 begins with the specified byte value. This
|
|
364
|
-
* is used to narrow the search space before binary searching.
|
|
365
|
-
*
|
|
366
|
-
* The fanout table stores cumulative counts, so:
|
|
367
|
-
* - `fanout[i]` = count of all objects with first byte <= i
|
|
368
|
-
* - Range for byte `b` is [fanout[b-1], fanout[b])
|
|
369
|
-
* - For byte 0, range is [0, fanout[0])
|
|
370
|
-
*
|
|
371
|
-
* @param {Uint32Array} fanout - The 256-entry fanout table
|
|
372
|
-
* @param {number} firstByte - The first byte of the object ID (0-255)
|
|
373
|
-
* @returns {{ start: number; end: number }} Start (inclusive) and end (exclusive) indices
|
|
374
|
-
*
|
|
375
|
-
* @example
|
|
376
|
-
* // Find range for objects starting with 0xab
|
|
377
|
-
* const { start, end } = getFanoutRange(index.fanout, 0xab);
|
|
378
|
-
* // Now binary search entries[start..end)
|
|
379
|
-
*/
|
|
380
|
-
export declare function getFanoutRange(fanout: Uint32Array, firstByte: number): {
|
|
381
|
-
start: number;
|
|
382
|
-
end: number;
|
|
383
|
-
};
|
|
384
|
-
/**
|
|
385
|
-
* Calculates the CRC32 checksum of data.
|
|
386
|
-
*
|
|
387
|
-
* @description Computes a CRC32 checksum using the IEEE 802.3 polynomial,
|
|
388
|
-
* which is the same algorithm used by Git for pack index verification.
|
|
389
|
-
* This checksum is stored in the pack index to verify object integrity
|
|
390
|
-
* without full decompression.
|
|
391
|
-
*
|
|
392
|
-
* @param {Uint8Array} data - The data to checksum (typically compressed object data)
|
|
393
|
-
* @returns {number} 32-bit unsigned CRC32 checksum
|
|
394
|
-
*
|
|
395
|
-
* @example
|
|
396
|
-
* // Calculate CRC32 of compressed data
|
|
397
|
-
* const compressed = pako.deflate(objectData);
|
|
398
|
-
* const crc = calculateCRC32(compressed);
|
|
399
|
-
* // Store crc in pack index entry
|
|
400
|
-
*/
|
|
401
|
-
export declare function calculateCRC32(data: Uint8Array): number;
|
|
402
|
-
/**
|
|
403
|
-
* Performs binary search for an object ID within a range of entries.
|
|
404
|
-
*
|
|
405
|
-
* @description Searches for an exact match of the object ID within the
|
|
406
|
-
* specified range of the sorted entries array. Uses string comparison
|
|
407
|
-
* which works correctly for hexadecimal SHA-1 hashes.
|
|
408
|
-
*
|
|
409
|
-
* **Time Complexity:** O(log n) where n = end - start
|
|
410
|
-
*
|
|
411
|
-
* @param {PackIndexEntry[]} entries - Sorted array of pack index entries
|
|
412
|
-
* @param {string} objectId - 40-character hex object ID (SHA) to search for
|
|
413
|
-
* @param {number} start - Start index (inclusive)
|
|
414
|
-
* @param {number} end - End index (exclusive)
|
|
415
|
-
* @returns {number} Index of the entry if found, or -1 if not found
|
|
416
|
-
*
|
|
417
|
-
* @example
|
|
418
|
-
* // Search within a specific range (from fanout lookup)
|
|
419
|
-
* const { start, end } = getFanoutRange(index.fanout, 0xab);
|
|
420
|
-
* const position = binarySearchObjectId(index.entries, targetSha, start, end);
|
|
421
|
-
* if (position !== -1) {
|
|
422
|
-
* const entry = index.entries[position];
|
|
423
|
-
* }
|
|
424
|
-
*/
|
|
425
|
-
export declare function binarySearchObjectId(entries: PackIndexEntry[], objectId: string, start: number, end: number): number;
|
|
426
|
-
/**
|
|
427
|
-
* Alias for {@link binarySearchObjectId} for backward compatibility.
|
|
428
|
-
* @deprecated Use binarySearchObjectId instead
|
|
429
|
-
*/
|
|
430
|
-
export declare const binarySearchSha: typeof binarySearchObjectId;
|
|
431
|
-
/**
|
|
432
|
-
* Serializes a PackIndex structure to binary .idx format.
|
|
433
|
-
*
|
|
434
|
-
* @description Converts a structured PackIndex object into the binary format
|
|
435
|
-
* used by Git for .idx files. This is the inverse of {@link parsePackIndex}.
|
|
436
|
-
*
|
|
437
|
-
* **Output Structure:**
|
|
438
|
-
* 1. Magic number (4 bytes)
|
|
439
|
-
* 2. Version (4 bytes)
|
|
440
|
-
* 3. Fanout table (1024 bytes)
|
|
441
|
-
* 4. Object IDs sorted (N * 20 bytes)
|
|
442
|
-
* 5. CRC32 values (N * 4 bytes)
|
|
443
|
-
* 6. 4-byte offsets (N * 4 bytes)
|
|
444
|
-
* 7. 8-byte large offsets if needed
|
|
445
|
-
* 8. Pack checksum (20 bytes)
|
|
446
|
-
* 9. Index checksum (20 bytes) - computed during serialization
|
|
447
|
-
*
|
|
448
|
-
* @param {PackIndex} index - The pack index to serialize
|
|
449
|
-
* @returns {Uint8Array} Complete .idx file as binary data
|
|
450
|
-
*
|
|
451
|
-
* @example
|
|
452
|
-
* // Serialize an index after modifications
|
|
453
|
-
* const index = parsePackIndex(originalData);
|
|
454
|
-
* // ... modify index ...
|
|
455
|
-
* const newData = serializePackIndex(index);
|
|
456
|
-
*/
|
|
457
|
-
export declare function serializePackIndex(index: PackIndex): Uint8Array;
|
|
458
|
-
/**
|
|
459
|
-
* Parses the 256-entry fanout table from pack index data.
|
|
460
|
-
*
|
|
461
|
-
* @description The fanout table is a core data structure that enables O(1)
|
|
462
|
-
* range lookup for binary search. Each entry stores the cumulative count
|
|
463
|
-
* of objects whose first SHA byte is <= the entry index.
|
|
464
|
-
*
|
|
465
|
-
* **Table Properties:**
|
|
466
|
-
* - 256 entries (one per possible first byte value)
|
|
467
|
-
* - Each entry is 4 bytes, big-endian
|
|
468
|
-
* - Values must be monotonically non-decreasing
|
|
469
|
-
* - fanout[255] = total object count
|
|
470
|
-
*
|
|
471
|
-
* @param {Uint8Array} data - Raw bytes starting at the fanout table (1024 bytes minimum)
|
|
472
|
-
* @returns {Uint32Array} 256-entry fanout table
|
|
473
|
-
*
|
|
474
|
-
* @example
|
|
475
|
-
* // Parse fanout from index data
|
|
476
|
-
* const fanoutData = indexData.subarray(8, 8 + 256 * 4);
|
|
477
|
-
* const fanout = parseFanoutTable(fanoutData);
|
|
478
|
-
* const totalObjects = fanout[255];
|
|
479
|
-
*/
|
|
480
|
-
export declare function parseFanoutTable(data: Uint8Array): Uint32Array;
|
|
481
|
-
/**
|
|
482
|
-
* Reads a pack file offset from the index, handling both small and large offsets.
|
|
483
|
-
*
|
|
484
|
-
* @description Pack index offsets use a special encoding to support files > 2GB:
|
|
485
|
-
* - If MSB is clear: the 4-byte value is the direct offset
|
|
486
|
-
* - If MSB is set: the lower 31 bits are an index into the large offset table
|
|
487
|
-
*
|
|
488
|
-
* The large offset table stores 8-byte offsets for objects beyond the 2GB boundary.
|
|
489
|
-
*
|
|
490
|
-
* @param {Uint8Array} data - 4 bytes containing the offset or large offset index
|
|
491
|
-
* @param {Uint8Array} [largeOffsets] - The 8-byte large offset table (required for offsets > 2GB)
|
|
492
|
-
* @returns {number} The actual byte offset in the packfile
|
|
493
|
-
* @throws {Error} If a large offset is indicated but largeOffsets is not provided
|
|
494
|
-
* @throws {Error} If the large offset index is out of bounds
|
|
495
|
-
*
|
|
496
|
-
* @example
|
|
497
|
-
* // Read offset for an entry
|
|
498
|
-
* const offsetData = indexData.subarray(offsetsStart + i * 4, offsetsStart + (i + 1) * 4);
|
|
499
|
-
* const offset = readPackOffset(offsetData, largeOffsetsTable);
|
|
500
|
-
*/
|
|
501
|
-
export declare function readPackOffset(data: Uint8Array, largeOffsets?: Uint8Array): number;
|
|
502
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/pack/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pack/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGzC;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,yBAA2C,CAAA;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAA;AAEnC;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,aAAa,CAAA;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAgBD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,SAAS;IACxB,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAA;IACf,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,MAAM,EAAE,WAAW,CAAA;IACnB,wEAAwE;IACxE,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,uEAAuE;IACvE,YAAY,EAA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