+ if (bytes_dl <= 64) {
+ array_size_dl = 1;
+
+ uint8_t buffer[array_size_dl];
+ buffer[0] = bytes_dl & 0xFF;
+ bytesdl->buf = (uint8_t*)calloc(1,1);
+ memcpy(bytesdl->buf,buffer,1);
+ bytesdl->size = 1;
+
+ } else if (bytes_dl <= 16384) {
+ array_size_dl = 2;
+
+ uint8_t buffer[array_size_dl];
+ buffer[0] = (bytes_dl >> 8) & 0xFF;
+ buffer[1] = bytes_dl & 0xFF;
+ bytesdl->buf = (uint8_t*)calloc(2,1);
+ memcpy(bytesdl->buf,buffer,2);
+ bytesdl->size = 2;
+
+ } else if (bytes_dl <= 4194304) {
+ array_size_dl = 3;
+
+ uint8_t buffer[array_size_dl];
+ buffer[0] = (bytes_dl >> 16) & 0xFF;
+ buffer[1] = (bytes_dl >> 8) & 0xFF;
+ buffer[2] = bytes_dl & 0xFF;
+ bytesdl->buf = (uint8_t*)calloc(3,1);
+ memcpy(bytesdl->buf,buffer,3);
+ bytesdl->size = 3;
+
+ } else if (bytes_dl <= 1073741824) {
+ array_size_dl = 4;
+ uint8_t buffer[array_size_dl];
+ buffer[0] = (bytes_dl >> 24) & 0xFF;
+ buffer[1] = (bytes_dl >> 16) & 0xFF;
+ buffer[2] = (bytes_dl >> 8) & 0xFF;
+ buffer[3] = bytes_dl & 0xFF;
+ bytesdl->buf = (uint8_t*)calloc(4,1);
+ memcpy(bytesdl->buf,buffer,4);
+ bytesdl->size = 4;
+ }
+