# Save strings in files or Legato API?

**URL:** <https://forum.legato.io/t/save-strings-in-files-or-legato-api/6148>\
**Category:** Uncategorized\
**Created:** [March 18, 2022, 8:36pm UTC](https://forum.legato.io/t/save-strings-in-files-or-legato-api/6148 "2022-03-18T20:36:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gi1](https://avatars.discourse-cdn.com/v4/letter/g/e79b87/32.png) [@gi1](https://forum.legato.io/u/gi1)\
**Post date:** [March 18, 2022, 8:36pm UTC](https://forum.legato.io/t/save-strings-in-files-or-legato-api/6148/1 "2022-03-18T20:36:10Z")

</div>

Hello all,  
my device send gps position while moving over network (using sockets), i want to be able to save data when network is absent or not enough for network connection. What can be the best approach to save strings (nmea sentences) for a later send? Files? usually i get a string every 2 seconds… and i can save to file then later zip and send this file… is this the right way or I can use some built-in API ?

Br  
Gianmaria

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [March 19, 2022, 2:41am UTC](https://forum.legato.io/t/save-strings-in-files-or-legato-api/6148/2 "2022-03-19T02:41:41Z")

</div>

It seems to be ok …

you can use this zip tool:

> **[How to install p7zip-full in MangOH Red board which is having WP7702 module?](https://forum.mangoh.io/t/how-to-install-p7zip-full-in-mangoh-red-board-which-is-having-wp7702-module/3711/9)**
>
> The previous binary downloaded from github is not working. You can try this binary built by me from yocto source. 7za (1.4 MB) root@swi-mdm9x15:~# chmod 777 /tmp/7za root@swi-mdm9x15:~# root@swi-mdm9x15:~# /tmp/7za 7-Zip (a) \[32\] 16.02 :...

---

<div class="post-metadata">

**Author:** ![gi1](https://avatars.discourse-cdn.com/v4/letter/g/e79b87/32.png) [@gi1](https://forum.legato.io/u/gi1)\
**Post date:** [March 19, 2022, 6:56am UTC](https://forum.legato.io/t/save-strings-in-files-or-legato-api/6148/3 "2022-03-19T06:56:55Z")

</div>

Thank you so much for your help. I see already have gzip onboard… maybe can use that?

Gianmaria

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [March 20, 2022, 4:05am UTC](https://forum.legato.io/t/save-strings-in-files-or-legato-api/6148/4 "2022-03-20T04:05:42Z")

</div>

I think so, both should be ok
