diff --git a/src/groupextcommands.cpp b/src/groupextcommands.cpp
index 8fa9f08..eb6b48e 100644
--- a/src/groupextcommands.cpp
+++ b/src/groupextcommands.cpp
@@ -24,7 +24,7 @@
 ipmi::RspType<> ipmiSBMRSendBootProgress(ipmi::Context::ptr ctx,
                                          std::vector<uint8_t> data)
 {
-    using postcode_t = std::tuple<uint64_t, std::vector<uint8_t>>;
+    using postcode_t = std::tuple<std::vector<uint8_t>, std::vector<uint8_t>>;
 
     std::optional<size_t> hostId = findHost(ctx->hostIdx);
 
@@ -43,11 +43,7 @@
 
     try
     {
-        auto primaryPostCode = reinterpret_cast<const uint64_t*>(data.data());
-        auto secondaryPostCode =
-            std::vector<uint8_t>(data.begin() + 8, data.end());
-        auto postCode =
-            postcode_t(bigEndianToHost(*primaryPostCode), secondaryPostCode);
+        postcode_t postCode(std::move(data), {});
         auto conn = getSdBus();
         auto hostbootRawObj =
             std::string(bootRawObjPrefix) + std::to_string(*hostId);
@@ -55,7 +51,8 @@
             conn->new_method_call(bootRawBusName, hostbootRawObj.data(),
                                   "org.freedesktop.DBus.Properties", "Set");
 
-        method.append(bootRawIntf, "Value", std::variant<postcode_t>(postCode));
+        method.append(bootRawIntf, "Value",
+                      std::variant<postcode_t>(std::move(postCode)));
 
         conn->call_noreply(method);
     }
diff --git a/src/usb-dbg.cpp b/src/usb-dbg.cpp
index 78fff85..ed15e4e 100644
--- a/src/usb-dbg.cpp
+++ b/src/usb-dbg.cpp
@@ -787,11 +787,6 @@
     // up to 70 codes can be displayed on 10 pages
     static constexpr size_t maxPostcodes = 70;
 
-    static constexpr const char* formatStr =
-        (postCodeSize == 4)   ? "{:08X}"
-        : (postCodeSize == 8) ? "{:016X}"
-                              : "{:02X}";
-
     if (page == 1)
     {
         // Initialize and clear frame (example initialization)
@@ -816,17 +811,19 @@
             auto reply = bus.call(method); // Send synchronous method call
 
             // Read postcode value
-            std::vector<std::tuple<uint64_t, std::vector<uint8_t>>> postcodes;
+            std::vector<std::tuple<std::vector<uint8_t>, std::vector<uint8_t>>>
+                postcodes;
             reply.read(postcodes);
 
             // retrieve the latest postcodes
             size_t numEntries = std::min(maxPostcodes, postcodes.size());
-            for (auto it = postcodes.rbegin();
-                 it != postcodes.rbegin() + numEntries; ++it)
+            auto range = std::ranges::subrange(postcodes.rbegin(),
+                                               postcodes.rbegin() + numEntries);
+            for (const auto& [code, extra] : range)
             {
-                const auto& [code, extra] = *it;
-                std::string result = std::format(formatStr, code);
-                for (const auto& byte : extra)
+                std::string result;
+                result.reserve(2 * code.size());
+                for (const auto& byte : code)
                 {
                     result += std::format("{:02X}", byte);
                 }
