Blob
#struct BlobBytes read from a pack. The caller owns them.
| Name | Type | Description |
|---|---|---|
data | void* | A pointer to the bytes. |
size | i64 = 0 | The number of bytes. |
import gui.webview.pack
func main:
println pack.PackDir("www", "app.pack", "com.example.app")
println pack.AppendPack("app", "app.pack")
mut opened := pack.Pack {}
if pack.Open("app", "com.example.app", opened):
println opened.path, opened.key, opened.Count()
blob := opened.Read("index.html")
println blob.data != null, blob.size
end
println pack.ReadRange("app.pack", 0 as i64, 4 as i64) != null
end