From 1fd220416c0f63f59bfa6606125a9a19358e71b7 Mon Sep 17 00:00:00 2001 From: Michael Hohn Date: Fri, 13 Jun 2025 22:36:41 -0700 Subject: [PATCH] start commenting code with math notation --- pkg/qldbstore/qldbstore_hepc.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/qldbstore/qldbstore_hepc.go b/pkg/qldbstore/qldbstore_hepc.go index bd7a760..2b44695 100644 --- a/pkg/qldbstore/qldbstore_hepc.go +++ b/pkg/qldbstore/qldbstore_hepc.go @@ -233,6 +233,15 @@ func (h *HepcStore) FindAvailableDBs(analysisReposRequested []common.NameWithOwn } func extractDatabaseFromTar(tarStream io.Reader) ([]byte, bool, error) { + /* + Input: tarStream ∈ GZIP(TAR(Files)) + + Find f ∈ Files | name(f) = "artifacts/codeql_database.zip" + + if ∃ f → (bytes(f), true, nil) + if ¬∃ f → (nil, false, nil) + if error → (nil, false, error) + */ gzReader, err := gzip.NewReader(tarStream) if err != nil { slog.Error("failed to open gzip stream", "error", err)