{"id":16981399,"url":"https://github.com/charonn0/rb-tridlib","last_synced_at":"2026-03-18T23:03:36.835Z","repository":{"id":21785691,"uuid":"25108113","full_name":"charonn0/RB-TridLib","owner":"charonn0","description":"Realbasic glue code for TridLib","archived":false,"fork":false,"pushed_at":"2022-11-26T23:13:59.000Z","size":877,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T17:47:54.624Z","etag":null,"topics":["realbasic","tridlib","xojo"],"latest_commit_sha":null,"homepage":null,"language":"REALbasic","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charonn0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-12T04:31:44.000Z","updated_at":"2024-01-12T18:04:27.000Z","dependencies_parsed_at":"2023-01-11T21:21:14.058Z","dependency_job_id":null,"html_url":"https://github.com/charonn0/RB-TridLib","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/charonn0%2FRB-TridLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FRB-TridLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FRB-TridLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charonn0%2FRB-TridLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charonn0","download_url":"https://codeload.github.com/charonn0/RB-TridLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244883070,"owners_count":20525960,"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":["realbasic","tridlib","xojo"],"created_at":"2024-10-14T02:05:25.294Z","updated_at":"2026-01-05T01:19:12.573Z","avatar_url":"https://github.com/charonn0.png","language":"REALbasic","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RB-TridLib\nRealbasic glue code for [TridLib](http://mark0.net/code-tridlib-e.html), which is a tool for guessing file formats by analyzing patterns in the file data. TridLib is available on Win32 only.\n  \n## Prerequisites\nThe `TridLib.dll` and `TridDefs.trd` files must be located in the same directory as your app's executable.\n  \n## Basic usage\nThe `TridLib` module provides an extension method for folderitems:\n\n```realbasic\nFunction TrIDTypes(Extends f As FolderItem) As TridLib.FileType()\n```\n\nTo get a list of probable file types for a folderitem, use this method to get an array of `TridLib.FileType` objects.\nThese objects have no methods and are merely containers for the filetype data. \n\nFor example:\n```realbasic\n  Dim item As FolderItem ' assume a valid FolderItem\n  Dim t() As TridLib.FileType = item.TrIDTypes()\n  For Each type As TridLib.FileType In t\n    MsgBox(type.Description + \"(\" + type.Extension + \")\" + Format(type.Points, \"###,###,##0.0#\"))\n  Next\n  ```\n\n## Advanced usage\nThe `TridLib` module has a number of protected functions which allow low-level access to TridLib should you need to do something not supported by the `TrIDTypes` method discussed above. These methods are:\n\n* `Analyze() As Integer`: Performs the analysis on a previously submitted file.\n* `DefCount() As Integer`: The total number of file format definitions known.\n* `GetInfo(InfoType As Integer, InfoIndex As Integer, Output As MemoryBlock = Nil) As Integer`: Retrieves data about the most recently analyzed file.\n* `LoadDefsPack(Directory As FolderItem) As Integer`: Loads the file named `TridDefs.trd` from the specified directory. Returns the number of definitions loaded.\n* `SetDefsPack(RawDefData As MemoryBlock) As Integer`: Loads file format definitions from memory. This is only available in paid versions of `TridLib.dll`. Returns the number of definitions loaded.\n* `SubmitFile(File As FolderItem) As Integer`: Prepares a new file for analysis. \n* `Version() As Integer`: The version number of `TridLib.dll`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharonn0%2Frb-tridlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharonn0%2Frb-tridlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharonn0%2Frb-tridlib/lists"}