Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open raw file for input
- while not end of raw file
- // Label 1
- read 1 byte of file
- check if this is the first byte of the jpeg header
- if it is
- read the next 3 bytes
- if they are also part of the jpeg header
- open a new output file
- start writing to output file
- // label 2
- keep reading 512 byte chunks of file
- if the first 4 bytes are a jpeg header
- we have found a new file
- close current output file
- open a new file
- loop back to label 2
- they are not part of the header
- so go back to label 1
- It is not the jpeg header
- keep reading at Label1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement