{"id":22266630,"url":"https://github.com/fly-studio/merged-fuse","last_synced_at":"2026-03-11T20:03:01.921Z","repository":{"id":165509855,"uuid":"86703974","full_name":"fly-studio/merged-fuse","owner":"fly-studio","description":"Virtual merge files or replace bytes, and output the merged content, FUSE.","archived":false,"fork":false,"pushed_at":"2017-05-22T02:22:39.000Z","size":107,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-28T10:47:54.209Z","etag":null,"topics":["cpp","cpp11","fuse","merge","replace-in-files"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fly-studio.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":"2017-03-30T13:10:32.000Z","updated_at":"2023-12-18T10:29:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"8710e68a-b217-48cd-ad35-610b2ae22a01","html_url":"https://github.com/fly-studio/merged-fuse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fly-studio/merged-fuse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-studio%2Fmerged-fuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-studio%2Fmerged-fuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-studio%2Fmerged-fuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-studio%2Fmerged-fuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fly-studio","download_url":"https://codeload.github.com/fly-studio/merged-fuse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-studio%2Fmerged-fuse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30398185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T18:46:22.935Z","status":"ssl_error","status_checked_at":"2026-03-11T18:46:17.045Z","response_time":84,"last_error":"SSL_read: 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":["cpp","cpp11","fuse","merge","replace-in-files"],"created_at":"2024-12-03T10:19:28.019Z","updated_at":"2026-03-11T20:03:01.915Z","avatar_url":"https://github.com/fly-studio.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[TOC]\n\n# Introduce\nIt's a fuse plugin, and it can virtual merges files, and virtual replaces bytes.\n\nwhen system read this file, it output the merged/replaced content of many really files that you set.\n\nBut it's not a really merged file, it only output the merged content when you use `fread pread, even md5...` in linux.\n\nSo, you can save so many disk space.\n\n\u003e the code is based by https://github.com/schlaile/concatfs, Thanks!\n\n**Example**\n\ncreate `/the/src/dir/`1.txt\n\n```text\n12345678\n```\n\ncreate `/the/src/dir/`2.txt\n\n```text\nabcdefghi\n```\n\ncreate a file named `/the/mounted/dir/`1-merged-.txt,\n\n`-merged-` is a special words in the file name, and the content is\n\n**JSON format**\n```json\n[\n    {\n        \"path\": \"1.txt\"\n    },\n    {\n        \"path\": \"2.txt\"\n    }\n]\n```\n\n`cat /the/mounted/dir/1-merged-.txt`, output:\n\n```text\n12345678abcdefghi\n```\n\nSo it virtual merges two files, with a json, and output the merged content when reading.\n\n\u003e Of course, this plugin builds for **BIG SIZE** files. eg: `mkv, mp4`,\n\u003e\n\u003e Or so many **BIG SIZE** copies with a few difference. eg: program copies(with different biz channel ID)\n\n# FEATURES\n- Runs in userspace (FUSE);\n- Files with the string `-merged-` anywhere in the filename are considered concatenation description special files;\n- JSON format;\n- Save disk space;\n- Virtual merge files;\n- Virtual replace file's content.\n- Auto mount in fstab at Boot\n\n# Install\nIt needs GCC 4.9, [Install GCC 4.9 in CentOS 6/7](#install-gcc-49-in-centos-67)\n\n\u003e modern C++ 11\n\n```bash\nyum install fuse fuse-devel\n\ncd merged-fuse\nmake\nmake install\n```\n\nUninstall\n```\nmake uninstall\n```\n\n# Usage\n## Directories\nIt's a FUSE plugin, so it uses two directories:\n- source dir\n- be mounted dir\n\n```bash\nmkdir /the/src/dir\nmkdir /the/mounted/dir\n```\n\nYou can **Write** your `-merged-` file at source dir\n\nAnd **Read** your `-merged-` file at mounted dir after `merged-fuse` or `fstab`\n\n## Run in background\n```bash\nmerged-fuse /the/src/dir/ /the/mount/dir/\n```\n## Run in debugging\n\n\u003e see http://man7.org/linux/man-pages/man8/mount.fuse.8.html\n\u003e https://www.cs.hmc.edu/~geoff/classes/hmc.cs135.201109/homework/fuse/fuse_doc.html#other-options\n\n```\nmerged-fuse /the/src/dir/ /the/mount/dir/ -d\n```\n\n## Run in other user\ncreate your config to  `/etc/fuse.conf`\n\n\u003e see http://manpages.ubuntu.com/manpages/precise/man8/mount.fuse.8.html\n\n```\nuser_allow_other\n```\nrun with user 'apache' and allow other user read/write\n```\nsudo -u apache merged-fuse /the/src/dir/ /the/mount/dir/ -o allow_other\n```\n\n## Stop\n```bash\numount /the/mounted/dir/\n```\n\n## Register to fstab\nTo have the pool mounted at boot or otherwise accessable from related tools use `/etc/fstab.`\n```bash\n# \u003cfile system\u003e    \u003cmount point\u003e     \u003ctype\u003e            \u003coptions\u003e             \u003cdump\u003e  \u003cpass\u003e\n /the/src/dir      /the/mounted/dir  fuse.merged-fuse  defaults,allow_other  0       0\n```\n\n# Methods\n\n## MERGE\nWrite at src dir\n```bash\n/the/src/dir/game.of.thrones-merge-.mp4\n```\n\n```json\n[\n    {\n        \"path\": \"1.mp4\"\n    },\n    {\n        \"path\": \"2.mp4\"\n    },\n    {\n        \"path\": \"3.mp4\"\n    }\n]\n```\nRead at mounted dir\n\n```bash\n/the/mounted/dir/game.of.thrones-merge-.mp4\n```\n\n## REPLACE\nWrite at src dir\n```bash\n/the/src/dir/1-merge-.zip\n```\n\n- offset [long long]: may ±, current file's offset,\n\n    If **offset** is negative, it will seeking from the end of file\n\n    If **offset** is out of file, return error.\n\n- length [short]: max value is 1024\n\n    If **length** is greater than the offset to the end of file,\n    it's fine, the replaced content will be truncate, and it'll not overflow.\n\n\n- content [string]: BASE64, the repleaced content(supported Binary)\n\n    If **BASE64 DECODED Content**'s size is less than **length**, return error.\n\n```json\n[\n    {\n        \"path\": \"1.zip\",\n        \"replaces\": [\n            {\n                \"offset\": 10,\n                \"length\": 4,\n                \"content\": \"NDMyMQ==\"\n            },\n            {\n                \"offset\": -2,\n                \"length\": 2,\n                \"content\": \"MjE=\"\n            }\n        ]\n    },\n    {\n        \"path\": \"2.text\"\n    }\n]\n```\nRead at mounted dir\n\n```bash\n/the/mounted/dir/1-merge-.zip\n```\n\n# Permission\n## fuse: failed to exec fusermount: Permission denied\n\nchange `/dev/fuse`'s group to fuse\n\n```shell\nchgrp fuse /dev/fuse\n```\n\nadd your user to fuse's group, e.g. `nobody`, `apache`\n\n```bash\nusermod -a -G fuse root\nusermod -a -G fuse nobody\nusermod -a -G fuse apache\n```\n\n## fusermount: user has no write access to mountpoint `/your/mounted/dir/`\n\nchange your dir's user/group to who merged-fuse running, eg: `apache`\n\n```\nchown apache:apache /your/mounted/dir/\n```\n\n\n# Install GCC 4.9 in CentOS 6/7\n```bash\n$ yum install centos-release-scl-rh\n$ yum install devtoolset-3-binutils devtoolset-3-gcc devtoolset-3-gcc-c++\n\n\n# Backup your old gcc\n$ mv /usr/bin/gcc /usr/bin/gcc-v4.4.7\n$ mv /usr/bin/g++ /usr/bin/g++-v4.4.7\n$ mv /usr/bin/cc /usr/bin/cc-v4.4.7\n\n$ ln -s /opt/rh/devtoolset-3/root/usr/bin/gcc /usr/bin/gcc\n$ ln -s /opt/rh/devtoolset-3/root/usr/bin/gcc /usr/bin/cc\n$ ln -s /opt/rh/devtoolset-3/root/usr/bin/g++ /usr/bin/g++\n```\nIf you cannot install `centos-release-scl-rh`, install this repo first.\n```\ncat \u003e /etc/yum.repos.d/CentOS-Sclo-RH.repo \u003c\u003c EOF\n[centos-sclo-rh]\nname=CentOS-$releasever - SCLo rh\nbaseurl=http://mirror.centos.org/centos/$releasever/sclo/$basearch/rh/\ngpgcheck=0\nenabled=1\n#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo\nEOF\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-studio%2Fmerged-fuse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffly-studio%2Fmerged-fuse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-studio%2Fmerged-fuse/lists"}