{"id":22808304,"url":"https://github.com/sixarm/sixarm_ruby_magic_number_type","last_synced_at":"2025-04-22T12:42:43.394Z","repository":{"id":1382528,"uuid":"1337160","full_name":"SixArm/sixarm_ruby_magic_number_type","owner":"SixArm","description":"SixArm.com » Ruby » MagicNumberType infers a data type from the data's leading bytes","archived":false,"fork":false,"pushed_at":"2025-04-14T09:19:12.000Z","size":527,"stargazers_count":13,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T10:29:46.498Z","etag":null,"topics":["gem","magic-number","mime-types","ruby"],"latest_commit_sha":null,"homepage":"http://sixarm.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SixArm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-02-07T09:48:55.000Z","updated_at":"2025-04-14T09:19:17.000Z","dependencies_parsed_at":"2022-08-16T13:15:12.881Z","dependency_job_id":"f5f0b094-93a3-4be9-b92f-38b849da44bc","html_url":"https://github.com/SixArm/sixarm_ruby_magic_number_type","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_magic_number_type","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_magic_number_type/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_magic_number_type/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_magic_number_type/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SixArm","download_url":"https://codeload.github.com/SixArm/sixarm_ruby_magic_number_type/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250242853,"owners_count":21398210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gem","magic-number","mime-types","ruby"],"created_at":"2024-12-12T11:09:00.569Z","updated_at":"2025-04-22T12:42:43.333Z","avatar_url":"https://github.com/SixArm.png","language":"Ruby","readme":"# SixArm.com → Ruby → \u003cbr\u003e MagicNumberType infers mime types from leading bits\n\n\u003c!--header-open--\u003e\n\n[![Gem Version](https://badge.fury.io/rb/sixarm_ruby_magic_number_type.svg)](http://badge.fury.io/rb/sixarm_ruby_magic_number_type)\n[![Build Status](https://travis-ci.org/SixArm/sixarm_ruby_magic_number_type.png)](https://travis-ci.org/SixArm/sixarm_ruby_magic_number_type)\n[![Code Climate](https://api.codeclimate.com/v1/badges/6430fd86f553be7f328a/maintainability)](https://codeclimate.com/github/SixArm/sixarm_ruby_magic_number_type/maintainability)\n\n* Git: \u003chttps://github.com/SixArm/sixarm_ruby_magic_number_type\u003e\n* Doc: \u003chttp://sixarm.com/sixarm_ruby_magic_number_type/doc\u003e\n* Gem: \u003chttps://rubygems.org/gems/sixarm_ruby_magic_number_type\u003e\n* Contact: Joel Parker Henderson, \u003cjoel@sixarm.com\u003e\n* Project: [changes](CHANGES.md), [license](LICENSE.md), [contributing](CONTRIBUTING.md).\n\n\u003c!--header-shut--\u003e\n\n\n## Introduction\n\nMagic numbers are the first bits of a file or data stream\nwhich uniquely identify the type of file or data stream.\n\nFor example when the first bits are \"BM\",\nthis identifies the file as a bitmap image file.\n\nFor docs go to \u003chttp://sixarm.com/sixarm_ruby_magic_number_type/doc\u003e\n\nWant to help? We're happy to get pull requests.\n\n\n\u003c!--install-open--\u003e\n\n## Install\n\n### Gem\n\nTo install this gem in your shell or terminal:\n\n    gem install sixarm_ruby_magic_number_type\n\n### Gemfile\n\nTo add this gem to your Gemfile:\n\n    gem 'sixarm_ruby_magic_number_type'\n\n### Require\n\nTo require the gem in your code:\n\n    require 'sixarm_ruby_magic_number_type'\n\n\u003c!--install-shut--\u003e\n\n\n## Details\n\nThis gem infers based on widespread programming conventions for data file formats.\n\nThese magic numbers are by convention and we are using this guide:\nhttp://www.astro.keele.ac.uk/oldusers/rno/Computing/File_magic.html\n\nTypical uses of magic numbers:\n\n  * to quickly identify a file's data type\n  * to check if data matches the file's MIME type or extension\n  * to check if a web form file upload matches its HTTP content type\n\nCompare:\n\n  * MIME::Types ruby library\n  * Unix magic() command for testing files on disk\n  * http://shared-mime.rubyforge.org/\n\n\n## Contributors\n\n* [Joel Parker Henderson](https://github.com/joelparkerhenderson)\n* [Bill Lazar](https://github.com/billlazar)\n* [Kip Cole](https://github.com/kipcole9)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fsixarm_ruby_magic_number_type","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsixarm%2Fsixarm_ruby_magic_number_type","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fsixarm_ruby_magic_number_type/lists"}