BinaryData.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //
  2. // Created by Иван_Архипов on 31.10.2017.
  3. //
  4. #include <vector>
  5. #ifndef LOTRO_DAT_PATCHER_BINARYDATA_H
  6. #define LOTRO_DAT_PATCHER_BINARYDATA_H
  7. #include <cstdio>
  8. #include <string>
  9. extern "C++"
  10. {
  11. namespace LOTRO_DAT
  12. {
  13. class Database;
  14. class BinaryData
  15. {
  16. public:
  17. BinaryData();
  18. BinaryData(const BinaryData &d);
  19. BinaryData(BinaryData&& other) noexcept;
  20. BinaryData(const char* data, unsigned int size);
  21. explicit BinaryData(unsigned int size);
  22. ~BinaryData();
  23. unsigned char& operator[] (const unsigned int &pos);
  24. BinaryData operator +(const BinaryData &b);
  25. bool operator == (const BinaryData &b) const;
  26. bool operator != (const BinaryData &b) const;
  27. bool Empty() const;
  28. void Append(const BinaryData &b, size_t offset = 0);
  29. template <unsigned int T>
  30. long long ToNumber(const long long &pos) const;
  31. template <unsigned int T>
  32. long long ToNumberRAW(const long long &pos) const;
  33. template <unsigned int T>
  34. static BinaryData FromNumber(const long long &number);
  35. template <unsigned int T>
  36. static BinaryData FromNumberRAW(const long long &number);
  37. size_t size() const;
  38. unsigned char* data() const;
  39. BinaryData& operator=(const BinaryData& data);
  40. BinaryData CutData(long long first = 0, long long last = -1) const;
  41. bool WriteToFile(const char *filename) const;
  42. bool WriteToFile(const std::string &filename) const;
  43. void ReadFromFile(const char *filename);
  44. void ReadFromFile(const std::string &filename);
  45. bool CheckCompression() const;
  46. BinaryData DecompressData(unsigned int offset = 0) const;
  47. BinaryData CompressData(unsigned int offset = 0) const;
  48. private:
  49. unsigned char *data_;
  50. size_t size_;
  51. };
  52. }
  53. }
  54. #endif //LOTRO_DAT_PATCHER_BINARYDATA_H
PANIC: session(release): write data/sessions/d/f/df7f2d1cce6f8980: no space left on device

PANIC

session(release): write data/sessions/d/f/df7f2d1cce6f8980: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)