zip
Key-Value Store driver¶
The zip
driver implements support for reading from
ZIP format
files on top of a base key-value store. (Not all ZIP features are supported.)
- json kvstore/zip : object¶
Read-only adapter for the ZIP archive format.
JSON specification of the key-value store.
- Extends:¶
KvStoreAdapter
— Key-value store adapter that adapts a single base key-value store.
- Required members:¶
-
driver :
"zip"
¶
- base : KvStore | KvStoreUrl¶
Base key-value store to adapt.
-
driver :
- Optional members:¶
- path : string¶
Key prefix within the key-value store.
If the prefix is intended to correspond to a Unix-style directory path, it should end with
"/"
.
-
cache_pool : ContextResource =
"cache_pool"
¶ Specifies or references a previously defined
Context.cache_pool
. It is typically more convenient to specify a defaultcache_pool
in thecontext
.
-
data_copy_concurrency : ContextResource =
"data_copy_concurrency"
¶ Specifies or references a previously defined
Context.data_copy_concurrency
. It is typically more convenient to specify a defaultdata_copy_concurrency
in thecontext
.
- json KvStoreUrl/zip : string¶
zip:
KvStore URL schemeZip key-value store adapters may be specified using the
zip:path
URL syntax.Examples
URL representation
JSON representation
"file:///tmp/archive.zip|zip:path/within/archive"
{"driver": "zip", "path": "path/within/archive", "base": {"driver": "file", "path": "/tmp/archive.zip"} }
"file:///tmp/archive.zip|zip:nested.zip|zip:path/within/inner_zip"
{"driver": "zip", "path": "path/within/inner_zip", "base": {"driver": "zip", "path": "nested.zip", "base": {"driver": "file", "path": "/tmp/archive.zip"}} }
- Extends:¶
KvStoreUrl
— URL representation of a key-value store.
Example JSON specifications¶
{ "driver": "zip",
"kvstore": "gs://my-bucket/path/to/file.zip" }
Auto detection¶
This driver supports auto-detection based on the signature at the end of the file.
Warning
To limit the amount of data that is read, auto-detection is only supported if the end of file comment does not exceed 4096 bytes. ZIP archives with comments up to the maximum length of 65535 bytes are still supported without auto-detection, however.
Limitations¶
Writing is not supported, nor are all ZIP compression formats.