承接 flying-anvil/fileinfo 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

flying-anvil/fileinfo

Composer 安装命令:

composer require flying-anvil/fileinfo

包简介

Get information about files. Focused on exotic file types.

README 文档

README

Get information about files. Focused on exotic file types.

Supported Filetypes

extensiondescription
Application
Dev Tools
diffOutput of the diff command (and git diff)
patchOutput of the diff command (and git diff)
Games
lvlxSMBX2 Level
gmaGMod Mod
d2sDiablo 2 savegame
ROMs
rpxWii U Application
spcSPC700 Dump
smcSNES Rom
sfcSuper Famicom Rom
z64Nintendo 64 Rom
ndsNintendo DS Rom
gbaNintendo GameBoy Advance Rom
gbNintendo GameBoy Rom
nesNES ROM
Archive
zipLossless compressed archive
jarJava Archivce
Media
Audio
xmExtended Module Audio File
modModule Audio File
wavUncompressed Wave audio
Video
bikBink Video/Audio Container
bik2Bink Video/Audio Container
bk2Bink Video/Audio Container
Image
pngPortable Network Graphic
bmpBitmap
gifGraphics Interchange Format
jpgJoint Photographic (Experts) Group
jpegJoint Photographic Experts Group
jfifJPEG File Interchange Format
asepriteAseprite project file
Geometry
objWavefront OBJ
Misc
urlWindows shortcuts that point to a webstite

Restore Extension From Content

Can scan files to try to recognize the type and its file extension. Works for a ton of types.

CLI Usage

This package contains a script (fileinfo) that can be run from the CLI.
Usage: fileinfo [options] <file> [<file>...] [options]
See fileinfo --help for more information

List of supported options:

shortlongdescription
hhelpPrints help text
vversionPrints version text
aallShow all possible information
fullSame as all
eextensionOverride extension
ccontextUse context instead of extension
rreconstructTry to reconstruct extension for file by content
fformatFormat of the output
ddebugThrow Exceptions (if not specified, print the message)

Does work with multiple input files (fileinfo samples/*), however, the output differs and might not be considered stable when multiple files are shown.

Development Notes

Adding a new FileInfoExtractor

  1. Create a new class in src/InfoExtractor/Extractor/[…]
  2. Implement InfoExtractor
    • Try to use keys from InfoCommonKeys
  3. Create a new KnownExtension and Context
  4. Register it in DefaultDefinition

Adding a new ExtensionReader

For simple, non-offset magic bytes, add an entry to FileExtensionMagicByteSupplier::DEFAULT_SIMPLE_MAGIC.

For more complex ones:

  1. Create a new class in src/FileExtension/Reader/[…]
  2. Implement FileExtensionMagicByteReader
  3. Register it in FileExtensionMagicByteSupplier::DEFAULT_READERS

Acquiring sample files

Run the following command and give it an extension: bin/download-samples.php $extension
--all can be used to download all available samples.

Note that not all extensions have samples to download, due to practical or copyright reasons.

Local docker testing

dcd run --rm php bin/fileinfo ./samples/$file

flying-anvil/fileinfo 适用场景与选型建议

flying-anvil/fileinfo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 03 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 flying-anvil/fileinfo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 flying-anvil/fileinfo 我们能提供哪些服务?
定制开发 / 二次开发

基于 flying-anvil/fileinfo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-30