≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Read binary files in CopperCube bin2cc released
Posted by:
(you are not logged in)
Enter the missing letter in: "In?ernational"
(you are not logged in)
Text:
[quote][b]sakura[/b] wrote: I was recently planning to develop a method for camera control, and I had a problem. I found that CopperCube's ccbReadFileContent function can only read text files, not binary files. When you try to read the binary file, you will find that it will be truncated when it encounters \0. In the documentation it is written: reads a full (text) file into a string. It can be seen that only text files can be read, but in fact JavaScript string can store binary data. So I developed a program, which I call bin2cc, that will convert a binary file to a file with the extension ccbin. Then the binary file can be read using the JavaScript function I wrote. I developed an exe program, and to avoid being reported as a virus by anti-virus software, I open source the core code, which is written in C. If you trust me, you can use the exe program. The easiest use is to drag the binary file onto the program and it will create a file of the same name with the ccbin extension, then use the ReadCCBinFile(path) function, where path is the ccbin file path. Tip1: The created ccbin file is twice as large as the original file. Tip2: If you know how to use CMD, you can type bin2cc path fast. Path is the ccbin file path. The "fast" parameter creates a ccbin file that is 4 times larger than the original, but the CopperCube reads it 10 times faster than the default ccbin file. Which one you use depends on your choice, the file size or the read speed. If you think the program is suspicious, you can compile the source code yourself: [code]File.WriteAllText(Path.GetDirectoryName(path) + @"\" + Path.GetFileNameWithoutExtension(path) + ".ccbin", "SakuraBin " + BitConverter.ToString(File.ReadAllBytes(path)).Replace("-", ""));[/code] The core code is very simple and if you know the C Sharp programming language, you should be able to understand what is happening. Here is the download address: [url]https://send.cm/d/LroK[/url] Password: Sakura[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact