Advertisement
Guest User

pseudo code for Baris

a guest
Oct 30th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. open raw file for input
  2.  
  3. while not end of raw file
  4. // Label 1
  5. read 1 byte of file
  6. check if this is the first byte of the jpeg header
  7. if it is
  8. read the next 3 bytes
  9. if they are also part of the jpeg header
  10. open a new output file
  11. start writing to output file
  12. // label 2
  13. keep reading 512 byte chunks of file
  14. if the first 4 bytes are a jpeg header
  15. we have found a new file
  16. close current output file
  17. open a new file
  18. loop back to label 2
  19. they are not part of the header
  20. so go back to label 1
  21. It is not the jpeg header
  22. keep reading at Label1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement