Want more features on Pastebin? Sign Up, it's FREE!
Guest

ByteSwap PS3 Nor Dump

By: a guest on Jan 27th, 2013  |  syntax: C++  |  size: 0.50 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. bool Methods::byteswap(std::string source, std::string destination){
  2.     std::ifstream inFileStream(source, std::ios::binary | std::ios::in);
  3.     std::ofstream outFileStream(destination, std::ios::binary | std::ios::out);
  4.     if (inFileStream && outFileStream){
  5.         char a, b;
  6.         while (inFileStream.get(a).get(b)) {
  7.             outFileStream.put(b).put(a);
  8.         }
  9.         outFileStream.close();
  10.         inFileStream.close();
  11.     }else{
  12.         return false;
  13.     }
  14.     return true;
  15. }
clone this paste RAW Paste Data