Comments (8)
@mvorisek I tried to use ffi, but because ffi does not support preprocessor directives (see first note https://www.php.net/manual/en/ffi.cdef.php), it is very difficult to load the header file. I've put it off for now.
from archive7z.
It seems that 7zip does not have such an opportunity. You can combine addEntry
and renameEntry
.
This task can be left as an improvement, but not in the near future.
from archive7z.
+1, could you please provide a 100% working example?
from archive7z.
@scratcher28, first of all, rename function is available only from 9.30 alpha version of 7zip.
Example is simple (from UnifiedArchive):
$this->sevenZip->addEntry($filename);
$this->sevenZip->renameEntry($filename, $localName);
from archive7z.
What about using FFI?
from archive7z.
What about preprocessing the header files with https://github.com/metala/ccpp ? It is quite old and not very popular project, but it might be enough and seems to be well written based on the C specs.
Currently the only article on web using FFI is https://stackoverflow.com/questions/18562959/python-cffi-7z-dll-com-access-violations-sometimes and it is for Python. It is also only for extraction. But it seems that only a few C declarations may be required which can even be hardcoded in this project.
from archive7z.
@Gemorroj Do you have the experiment code available and do you want to reconsider the ffi
solution for this project again?
from archive7z.
@mvorisek I don't plan any activity with ffi
for the foreseeable future.
I deleted my experiments because I thought the technology was still too raw. Either requires a decent knowledge of C.
from archive7z.
Related Issues (20)
- Failed on macos HOT 3
- Method for checking 7z executable availability HOT 5
- Fix custom encodings in filenames HOT 7
- ProcessTimedOutException on large 7Zip archives HOT 2
- Allow to disable timeout at all
- Extracting tar.gz/tar.bz2 in one-step HOT 2
- Need help with installation HOT 2
- Try FFI HOT 1
- Add support solid archive
- Add common archive info
- Better configuration
- getCrc() fails sometimes HOT 3
- Question marks in Cyrillic file names HOT 2
- physicalSize missing from gzip files HOT 3
- OVERWRITE_MODE_T duplicating all files HOT 1
- Hello, what is the problem causing this error? HOT 4
- Cant not find 7za because I install p7zip with opkg HOT 2
- Add support zip, gzip, bzip etc... HOT 3
- To do the equivalent of / and \ in file paths
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archive7z.