KGL ファイル形式とは?
.kgl ファイルは、KAGSA プログラミング言語用のコンパイル済みライブラリです。KAGSA は Python 上に構築され、MIT ライセンスの下でリリースされているインタープリタ言語です。開発者は Kagsa コードを .kg ソースファイルに記述し、再利用可能な関数を .kgl ライブラリにパッケージ化することで、他のプログラムから呼び出せるようにします。
内部的には、.kgl ファイルは拡張子が変更された .zip アーカイブです。これには常に少なくとも 2 つの Python ファイルが含まれています。コンパイルされたエントリポイントである main.py と、ライブラリの保存された名前空間データを保持する __memory__.py です。追加のヘルパーモジュールがある場合は、それらと一緒にパックされます。コンテナは標準の ZIP であるため、ファイルは使い慣れた PK シグネチャで始まります。
セキュリティと安全性
リスク: MEDIUMA .kgl is a ZIP archive containing executable Python code that the Kagsa interpreter runs when the library is imported. Extracting the archive is safe, but importing or running a library from an untrusted source executes its code, so only use .kgl files you trust.
形式の詳細
概要- kglab / kgl (Python graph library) - The 'kgl' name is also used by DerwenAI's kglab knowledge-graph package, but it does not define a .kgl file type.
- kgl.exe (generic executable) - Various unrelated Windows programs ship an executable named kgl.exe; unrelated to the Kagsa library format.
KGL ファイルを開くプログラム
技術的詳細
詳細仕様| Encoding | Binary (ZIP archive) |
| Byte order | Little-endian (ZIP fields) |
| Container | ZIP archive with the .kgl extension instead of .zip |
| Compression | Standard ZIP compression (DEFLATE or stored), inherited from the ZIP container |
| Encryption | None by default; a KGL is a plain archive with no built-in encryption |
| Typical size | A few kilobytes to a few hundred kilobytes, depending on the amount of compiled code |
| Structure | A ZIP archive holding the Python files produced when a Kagsa source library is compiled. It always contains main.py (the compiled library entry point) and __memory__.py (the library's stored state/namespace data), plus any additional helper .py files. |
| Integrity | CRC-32 per entry, provided by the ZIP format |
| Platforms | Windows, Linux, Termux (Android), macOS |
| Notes | Generated by the Kagsa interpreter with the command kagsa -l lib.kg -o lib.kgl. The input must be a .kg source file and the output name must end in .kgl. Because it is just a renamed ZIP, renaming a copy to .zip lets any archiver inspect the contents. |
| Produced By | kagsa command-line interpreter |
| Consumed By | Kagsa runtime when a .kg program imports the library |
| リリース日 | 2022 |
| 最新バージョン | Kagsa 1.2.0 (2023) |
| 仕様書 | www.kagsa.org |
KGL の変換
コミュニティ Q&A
ユーザーからの質問まだ質問はありません。KGL ファイルについて最初の質問をしてみましょう。