• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Big File Needs Broken

Vegito

Diamond Member
I have a 754Megabyte log file that I need to decipher.. or broken to a max of 32megabyte.. I try a file breaker and did not have success.. anyone here tried something like that.
 
Here is some C++ code that can do this:

#define max_file_size 102400

char buffer[max_file_size];
long file_size, len1, len2;
int num_blocks;
int file_in, file_out;

file_in = _open(input_file, _O_BINARY | _O_RDONLY);

file_size = filelength(file_in);
num_blocks = (int)(file_size / 102400);
char number[100] = "\0";
for (int j=0; j<num_blocks; j++)
{
_itoa(i, number, 10);
strcat(output_file, number);
file_out = _open(output_file, _O_BINARY | _O_WRONLY | _O_CREAT);

for (int i = 0; i< 35; i++)
{
len1 = _read(file_in, buffer, max_file_size);
len2 = _write(file_out, buffer, max_file_size);
}
_close(file_out);
}
_close(file_in);

Keep in mind function does no error handling. Its something I put together for breaking long mp3 files. let me know if you have questions.

BTW. you will need to include io.h in the driver program. It generates 35 mb files from a larger file named output_file1, output_file2 etc...
 
I agree with VanderStoep

You can pick winrar up HERE

The program is a compression program that allows you to break up the program or file you're compressing into files that will fit on one disk (Or any user defined size, such as 32MBs). Then it re-assembles them when you need them.

Hope this helps!
 
sorry I didn't clarify, I need it break it uncompress so I can read it.. its a text file so like after hitting x lines or x size, it make a new file. Will try.. thank.
 
Back
Top