{"id":18847806,"url":"https://github.com/interkosmos/fortran-zlib","last_synced_at":"2026-01-27T23:14:11.395Z","repository":{"id":139286329,"uuid":"494584096","full_name":"interkosmos/fortran-zlib","owner":"interkosmos","description":"Fortran 2018 interface bindings to zlib","archived":false,"fork":false,"pushed_at":"2025-03-19T13:29:43.000Z","size":19,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-23T00:33:51.947Z","etag":null,"topics":["archiving","compression","fortran","fortran-2018","fortran-package-manager","zlib"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interkosmos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-20T19:26:39.000Z","updated_at":"2025-05-16T06:38:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"8596236c-a79e-42d7-bc88-66845b3c741a","html_url":"https://github.com/interkosmos/fortran-zlib","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"793aa76682c667f666d3b5bcee846337e8adc9bb"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/interkosmos/fortran-zlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interkosmos%2Ffortran-zlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interkosmos%2Ffortran-zlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interkosmos%2Ffortran-zlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interkosmos%2Ffortran-zlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interkosmos","download_url":"https://codeload.github.com/interkosmos/fortran-zlib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interkosmos%2Ffortran-zlib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28826637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:13:12.038Z","status":"ssl_error","status_checked_at":"2026-01-27T23:05:59.307Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archiving","compression","fortran","fortran-2018","fortran-package-manager","zlib"],"created_at":"2024-11-08T03:09:43.938Z","updated_at":"2026-01-27T23:14:11.390Z","avatar_url":"https://github.com/interkosmos.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fortran-zlib\n\nA collection of Fortran 2018 interface bindings to selected zlib functions. The\nlibrary is also available on [MacPorts](https://ports.macports.org/port/fortran-zlib/).\n\n## Build Instructions\n\nBuild and install the library with the provided Makefile:\n\n```\n$ make\n$ make install PREFIX=/opt\n```\n\nLink your program against `/opt/lib/libfortran-zlib.a -lz`. Optionally,\noverwrite the default compiler:\n\n```\n$ make FC=ifx\n```\n\nOr, use the [Fortran Package Manager](https://github.com/fortran-lang/fpm):\n\n```\n$ fpm build --profile release\n```\n\nBuild and run the test program:\n\n```\n$ make test\n$ ./test_zlib\n```\n\n## Example\n\nThe following basic example compresses and uncompresses an input string.\n\n```fortran\n! example.f90\nprogram main\n    use :: zlib\n    implicit none (type, external)\n\n    character(len=:), allocatable :: str_in, str_out, str_x\n    integer(kind=z_ulong)         :: len_in, len_out, len_x\n    integer                       :: rc\n\n    ! Input.\n    str_in = repeat('Fortran ', 10)\n    len_in = len(str_in, kind=z_ulong)\n\n    ! Compress.\n    len_x = compress_bound(len_in)\n    allocate (character(len=len_x) :: str_x)\n    rc = compress(str_x, len_x, str_in, len_in)\n    if (rc /= Z_OK) stop 'Error: compress() failed'\n\n    ! Uncompress.\n    len_out = len_in\n    allocate (character(len=len_out) :: str_out)\n    rc = uncompress(str_out, len_out, str_x, len_x)\n    if (rc /= Z_OK) stop 'Error: uncompress() failed'\nend program main\n```\n\nIf the library has been installed to `/opt`, then compile, link, and run the\nexample program with:\n\n```\n$ gfortran -I/opt/include/libfortran-zlib -o example example.f90 /opt/lib/libfortran-zlib.a -lz\n$ ./example\n```\n\n## Coverage\n\n| C function      | Fortran interface |\n|-----------------|-------------------|\n| `adler32`       | `adler32`         |\n| `adler32_z`     | `adler32_z`       |\n| `compress`      | `compress`        |\n| `compress2`     | `compress2`       |\n| `compressBound` | `compress_bound`  |\n| `crc32`         | `crc32`           |\n| `crc32_z`       | `crc32_z`         |\n| `deflate`       | `deflate`         |\n| `deflateEnd`    | `deflate_end`     |\n| `deflateInit`   | `deflate_init`    |\n| `deflateInit2`  | `deflate_init2`   |\n| `inflate`       | `inflate`         |\n| `inflateEnd`    | `inflate_end`     |\n| `inflateInit`   | `inflate_init`    |\n| `inflateInit2`  | `inflate_init2`   |\n| `uncompress`    | `uncompress`      |\n| `uncompress2`   | `uncompress2`     |\n\n## Fortran Package Manager\n\nYou can add *fortran-zlib* as an *fpm* dependency:\n\n```toml\n[dependencies]\nfortran-zlib = { git = \"https://github.com/interkosmos/fortran-zlib.git\" }\n```\n\n## Licence\n\nISC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterkosmos%2Ffortran-zlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterkosmos%2Ffortran-zlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterkosmos%2Ffortran-zlib/lists"}